Open jaschaio opened 3 years ago
This is more likely to be related to esbuild
rather than snowpack
. Here is some discussion going on https://github.com/evanw/esbuild/issues/700
TL;DR dynamic imports
isn't something esbuild
gonna support out of the box
This does seem to be a bug; thanks for filing! Will investigate.
It seems that snowpack won't resolve the path when dynamic import has a variable in it. Any update?
This seems related to https://github.com/snowpackjs/snowpack/issues/2861, right?
This seems related to #2861, right?
Ah, right! This feature will solve the problem.
@drwpow I think this can be closed as a duplicate.
I'm expiriencing exactly the same thing. Any progress on this issue?
Bug Report Quick Checklist
3.1.2
6.14.11
macOS Catalina 10.15.7
14.14.0
Describe the bug
Snowpack doesn't resolve dynamic imports:
Throws
Uncaught (in promise) TypeError: Failed to resolve module specifier '@fortawesome/free-brands-svg-icons/faFacebook.js'
To Reproduce
Reproducible example: https://gist.github.com/jaschaio/321e794e7f8fb15d4bf9dfa0da46656c
Expected behavior
I would expect snowpack to notice the dynamic import, and replace the module identifier with the build output directory.