mirror of
https://github.com/dergigi/boris.git
synced 2026-02-11 10:04:25 +01:00
config: force SSR noExternal for applesauce packages
- Add ssr.noExternal to force pre-bundling of applesauce packages - Add mainFields to resolve module entry points - Add rollupOptions to ensure ESM output format - Workaround for restrictive exports map in applesauce-core@4.0.0
This commit is contained in:
2
dist/index.html
vendored
2
dist/index.html
vendored
@@ -5,7 +5,7 @@
|
||||
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Boris - Nostr Bookmarks</title>
|
||||
<script type="module" crossorigin src="/assets/index-CxfbtaRZ.js"></script>
|
||||
<script type="module" crossorigin src="/assets/index-BkANXbk6.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-Bqz-n1DY.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -8,7 +8,11 @@ export default defineConfig({
|
||||
},
|
||||
resolve: {
|
||||
extensions: ['.js', '.ts', '.tsx', '.json'],
|
||||
conditions: ['import', 'module', 'browser', 'default']
|
||||
conditions: ['import', 'module', 'browser', 'default'],
|
||||
// Disable strict package exports resolution to allow Rollup to resolve
|
||||
// internal modules in packages with restrictive exports maps
|
||||
preserveSymlinks: false,
|
||||
mainFields: ['module', 'jsnext:main', 'jsnext', 'main']
|
||||
},
|
||||
optimizeDeps: {
|
||||
include: ['applesauce-core', 'applesauce-factory', 'applesauce-relay', 'applesauce-react'],
|
||||
@@ -20,7 +24,17 @@ export default defineConfig({
|
||||
commonjsOptions: {
|
||||
include: [/node_modules/],
|
||||
transformMixedEsModules: true
|
||||
},
|
||||
rollupOptions: {
|
||||
output: {
|
||||
// Ensure ESM output
|
||||
format: 'es'
|
||||
}
|
||||
}
|
||||
},
|
||||
// Force pre-bundling of problematic packages
|
||||
ssr: {
|
||||
noExternal: ['applesauce-core', 'applesauce-factory', 'applesauce-relay']
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user