Add library build pipeline and token alignment report
- Configure Vite library mode to export MUI theme as plain JS - Add tsconfig.build.json for declaration generation - Add package.json exports for theme, Tailwind config, and tokens - Create src/index.ts as library entry point - Document token alignment between design system and production including colour mapping, flagged conflicts, and breakpoint alignment Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -12,4 +12,32 @@ export default defineConfig({
|
||||
'@theme': path.resolve(__dirname, 'src/theme'),
|
||||
},
|
||||
},
|
||||
build: {
|
||||
lib: {
|
||||
entry: path.resolve(__dirname, 'src/index.ts'),
|
||||
formats: ['es'],
|
||||
fileName: 'index',
|
||||
},
|
||||
rollupOptions: {
|
||||
external: [
|
||||
'react',
|
||||
'react-dom',
|
||||
'react/jsx-runtime',
|
||||
'@mui/material',
|
||||
'@mui/material/styles',
|
||||
'@mui/system',
|
||||
'@mui/icons-material',
|
||||
'@emotion/react',
|
||||
'@emotion/styled',
|
||||
],
|
||||
output: {
|
||||
globals: {
|
||||
react: 'React',
|
||||
'react-dom': 'ReactDOM',
|
||||
},
|
||||
},
|
||||
},
|
||||
outDir: 'dist',
|
||||
sourcemap: true,
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user