Snowpack is omitting an import from the very top of the file #2069
Replies: 3 comments 7 replies
-
Thanks! That's really strange... we should just be passing the file to |
Beta Was this translation helpful? Give feedback.
-
UPDATE: still happening on 3.8.8 I have the exact same issue. This is with Snowpack 2.18.5 I found that in my index.js (main entry file), my first import was being ignored by Snowpack. If I only have 1 import, then the web_modules folder doesn't get generated, and if I have more than 1 import, the first import is discarded entirely. This doesn't work: import _ from 'lodash';
export function sayHi()
{
alert(_.version());
} This works: // comment line here
import _ from 'lodash';
export function sayHi()
{
alert(_.version());
} |
Beta Was this translation helpful? Give feedback.
-
Same issue with 3.3.5 I am on Windows, does not affect all files, but most. |
Beta Was this translation helpful? Give feedback.
-
My
index.js
file looks like this:If I remove the top comment line and invoke
npx snowpack build
,@esfx/cancelable
will disappear fromweb_modules
.This is happening with Snowpack
v2.18.5
and3.0.0-rc.2
.I'll update this issue with a link to a repro-repo in a few mins. Edited, repo: https://github.com/noseratio/snowpack-import-bug
Beta Was this translation helpful? Give feedback.
All reactions