Expected "meta" but found "meta$1" - rollup error with dynamic imports
Environment
- Operating System:
Darwin - Node Version:
v16.14.2 - Nuxt Version:
3.0.0-rc.8-27681070.ad63817 - Package Manager:
[email protected] - Builder:
vite - User Config:
- - Runtime Modules:
- - Build Modules:
-
Reproduction
https://codesandbox.io/s/delicate-hill-p8707x?file=/views/subpages/%5Bid%5D.vue
Describe the bug
If I call more than one Lazy component between different folders, the Nuxt build will throw an error.
Additional context
To reproduce, run $ npm run build
Logs
Expected "meta" but found "meta$1"
11717| };
11718|
11719| defineAsyncComponent(() => __vitePreload(() => import('./Text.100e7f97.js'),true?"__VITE_PRELOAD__":void 0,import.meta$1.url));
| ^
11720| const meta$1 = undefined;
11721|
@danielroe the build error I mentioned yesterday
@danielroe Please take a read https://github.com/nuxt/framework/pull/6789#issuecomment-1237506822
This is still reproducible (although less frequently) - thanks @simirka for reproduction: https://codesandbox.io/s/suspicious-cherry-pqq6ci?file=/pages/test.vue.
Initially I think it's a rollup or vite bug.
@danielroe You welcome) I haven't found a quick fix, but yep it seems like rollup, something related to syntax. But the thing that it's working on rc.8.