Open alubbe opened 3 years ago
I know you're all incredibly busy, but here's a gentle poke to see if anyone has an idea what could be causing this issue - happy to help brain storm a solution!
From the fact that snowpack dev
is affected while snowpack build
works just fine, it might be a rollup configuration difference?
I've ran into a similar issue when using react-syntax-highlighter
. Stack trace below
Error: Cannot find module '
/* webpackChunkName: "react-syntax-highlighter_languages_highlight_oneC" */
'highlight.js/lib/languages/1c'' from '~/node_modules/react-syntax-highlighter/dist/esm/index.js'
at Function.resolveSync [as sync] (~/node_modules/resolve/lib/sync.js:102:15)
at Object.resolveEntrypoint (~/node_modules/snowpack/lib/index.js:97684:59)
at PackageSourceLocal.buildPackageImport (~/node_modules/snowpack/lib/index.js:124589:34)
at async ~/node_modules/snowpack/lib/index.js:124749:21
at async PackageSourceLocal.buildPackageImport (~/node_modules/snowpack/lib/index.js:124616:30)
at async ~/node_modules/snowpack/lib/index.js:124749:21
at async PackageSourceLocal.buildPackageImport (~/node_modules/snowpack/lib/index.js:124616:30)
at async PackageSourceLocal.prepare (~/node_modules/snowpack/lib/index.js:124392:13)
at async Object.command (~/node_modules/snowpack/lib/index.js:125207:5)
at async cli (~/node_modules/snowpack/lib/index.js:178039:9)
Not using the babel plugin though, used the typescript react template.
Bug Report Quick Checklist
Describe the bug
When using the
'@snowpack/plugin-babel',
plugin, we cannot import this:because
snowpack dev
throws this error:It compiles just fine when disabling the babel plugin.
To Reproduce
npm install
npm start
to see the error'@snowpack/plugin-babel'
fromsnowpack.config.js
npm start
now worksIdeas
Interestingly, doing things like this in our index.jsx compiles just fine
and also
snowpack build
also works fine.Googling around I found these two pieces of information, which might help understand what's going on: https://www.amcharts.com/docs/v4/getting-started/integrations/using-webpack/ https://github.com/webpack/webpack/issues/8656
Let me know if there's anything else I can help with here!