-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update pkgroll #38
Comments
looks like we should pin |
Agree, pin pkgroll to v2.5.1 |
Related to const entryDir = '/api'
const file = 'users/index.ts'
import(`.${entryDir}/${file}`) VariableDynamicImportError: invalid import "import(`.${entryDir}/${file}`)". A file extension must be included in the static part of the import. For example: import(`./foo/${bar}.js`).
at dynamicImportToGlob (C:\project\.yarn\__virtual__\@rollup-plugin-dynamic-import-vars-virtual-469ce0e48e\5\Users\USER\AppData\Local\Yarn\Berry\cache\@rollup-plugin-dynamic-import-vars-npm-2.1.5-a03e1726af-10c0.zip\node_modules\@rollup\plugin-dynamic-import-vars\dist\cjs\index.js:128:11)
at Object.enter (C:\project\.yarn\__virtual__\@rollup-plugin-dynamic-import-vars-virtual-469ce0e48e\5\Users\USER\AppData\Local\Yarn\Berry\cache\@rollup-plugin-dynamic-import-vars-npm-2.1.5-a03e1726af-10c0.zip\node_modules\@rollup\plugin-dynamic-import-vars\dist\cjs\index.js:169:26)
at SyncWalker.visit (C:\Users\USER\AppData\Local\Yarn\Berry\cache\estree-walker-npm-2.0.2-dfab42f65c-10c0.zip\node_modules\estree-walker\dist\umd\estree-walker.js:116:17)
at SyncWalker.visit (C:\Users\USER\AppData\Local\Yarn\Berry\cache\estree-walker-npm-2.0.2-dfab42f65c-10c0.zip\node_modules\estree-walker\dist\umd\estree-walker.js:153:12)
at SyncWalker.visit (C:\Users\USER\AppData\Local\Yarn\Berry\cache\estree-walker-npm-2.0.2-dfab42f65c-10c0.zip\node_modules\estree-walker\dist\umd\estree-walker.js:153:12)
at SyncWalker.visit (C:\Users\USER\AppData\Local\Yarn\Berry\cache\estree-walker-npm-2.0.2-dfab42f65c-10c0.zip\node_modules\estree-walker\dist\umd\estree-walker.js:153:12)
at SyncWalker.visit (C:\Users\USER\AppData\Local\Yarn\Berry\cache\estree-walker-npm-2.0.2-dfab42f65c-10c0.zip\node_modules\estree-walker\dist\umd\estree-walker.js:146:19)
at SyncWalker.visit (C:\Users\USER\AppData\Local\Yarn\Berry\cache\estree-walker-npm-2.0.2-dfab42f65c-10c0.zip\node_modules\estree-walker\dist\umd\estree-walker.js:146:19)
at SyncWalker.visit (C:\Users\USER\AppData\Local\Yarn\Berry\cache\estree-walker-npm-2.0.2-dfab42f65c-10c0.zip\node_modules\estree-walker\dist\umd\estree-walker.js:153:12)
at SyncWalker.visit (C:\Users\USER\AppData\Local\Yarn\Berry\cache\estree-walker-npm-2.0.2-dfab42f65c-10c0.zip\node_modules\estree-walker\dist\umd\estree-walker.js:146:19) {
id: 'C:\\project\\src\\index.ts',
hook: 'transform',
code: 'PLUGIN_ERROR',
plugin: 'rollup-plugin-dynamic-import-variables',
watchFiles: [
'C:\\project\\src\\index.ts'
]
} Workaround: const entryDir = '/api'
const file = 'users/index.ts'
import(`.${entryDir}/${file.replace(/.ts$/, '')}.ts`) |
Should we ask help to |
I guess we should |
2 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
pkgroll
with v2.6.0 adds @rollup/plugin-dynamic-import-vars for dynamic imports.At
elysia-autoload/src/index.ts
Line 137 in e897f87
@rollup/plugin-dynamic-import-vars
will throwVariableDynamicImportError
(rollup/plugins#1831).There is another solution?
The text was updated successfully, but these errors were encountered: