Skip to content
This repository was archived by the owner on Aug 13, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "npm run build -- --watch & npx serve ./dist",
"dev": "npm run build -- --watch & npx http-server ./dist --cors --port 3000",
"build": "tsc -b && vite build",
"lint": "eslint .",
"preview": "vite preview"
Expand Down
14 changes: 12 additions & 2 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ export default defineConfig({
preview: {
allowedHosts: true
},
define: {
'process.env': {},
process: {}
},
build: {
lib: {
name: 'MyLibrary',
Expand All @@ -16,9 +20,15 @@ export default defineConfig({
fileName: () => 'bundle.js', // Forces a single output file
},
rollupOptions: {
external: [], // Don't mark any dependencies as external
external: ['react', 'react-dom', '@epilot/concorde-elements'],

output: {
inlineDynamicImports: true, // Ensures a single file output
globals: {
react: 'React',
'react-dom': 'ReactDOM',
'@epilot/concorde-elements': 'Concorde'
},
inlineDynamicImports: true
},
},
cssCodeSplit: false, // Ensures a single CSS file output
Expand Down