mirror of
https://github.com/hanzoai/insights-icons.git
synced 2026-09-30 22:46:13 +00:00
@hanzo/[email protected].6 was published with no source repository behind it: on npm it is byte-identical to @posthog/[email protected].6 with only the package name changed, so the fork existed as a published artifact and nowhere else. The source here is recovered from that artifact's sourcemaps. Two things change from 0.36.6. Icons emit className "Icon" instead of "LemonIcon". Our stylesheets moved to .Icon, so every icon from this package lost its only sizing rule and rendered at full viewBox size. Insights carries a transitional rule matching both selectors; this lets that rule go away. Build output is dist/icons.* instead of dist/posthog-icons.*, so the upstream project name no longer appears in consumer-visible paths. The icon payload itself is untouched: 319 exports and 439 SVG path definitions, identical to 0.36.6. Co-authored-by: Hanzo Dev <[email protected]>
27 lines
972 B
TypeScript
27 lines
972 B
TypeScript
import { defineConfig } from 'vite'
|
|
import react from '@vitejs/plugin-react'
|
|
import dts from 'vite-plugin-dts'
|
|
|
|
export default defineConfig({
|
|
plugins: [react(), dts({ insertTypesEntry: true })],
|
|
build: {
|
|
sourcemap: true,
|
|
// Ship readable output: consumers minify at their own bundle step, and an
|
|
// unminified artifact stays diffable against the upstream it derives from.
|
|
minify: false,
|
|
lib: {
|
|
entry: 'src/index.ts',
|
|
// Output is named for what it is. Upstream emitted `posthog-icons.*`,
|
|
// which leaked the upstream project name into every consumer's import path.
|
|
fileName: (format) => `icons.${format}.js`,
|
|
formats: ['es', 'cjs'],
|
|
},
|
|
rollupOptions: {
|
|
external: ['react', 'react-dom', 'react/jsx-runtime'],
|
|
output: {
|
|
globals: { react: 'React', 'react-dom': 'ReactDOM' },
|
|
},
|
|
},
|
|
},
|
|
})
|