We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9d3b9e0 commit af2d287Copy full SHA for af2d287
vite.config.ts
@@ -15,6 +15,10 @@ export default defineConfig({
15
},
16
rollupOptions: {
17
external: (id: string) => !id.startsWith('.') && !path.isAbsolute(id) && !inline.includes(id),
18
+ output: {
19
+ preserveModules: true,
20
+ preserveModulesRoot: 'src',
21
+ },
22
23
24
plugins: [
@@ -24,7 +28,7 @@ export default defineConfig({
28
for (const id in bundle) {
25
29
const asset = bundle[id]
26
30
if ('code' in asset) {
27
- asset.code = asset.code.replace(/three\/(addons|examples)[^'"`]+/g, 'three-stdlib')
31
+ asset.code = asset.code.replace(/three\/(addons|examples)[^'"`]*/g, 'three-stdlib')
32
}
33
34
0 commit comments