Replies: 2 comments
-
I have just tried to create a reproducible example, and that doesn't work in On the new example project this doesn't exist so I now get
Which is at least now reported by the dev process. I still expected that it would work out I'd aliased Minimal Issue example at https://github.com/lummie/issue-snowpack-alias |
Beta Was this translation helpful? Give feedback.
-
Snowpack will alias your web_modules for you automatically, so you should just be able to do We just cleaned up these docs: https://www.snowpack.dev/#import-npm-packages |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have the following snowpack config:
I'm utilising the new top level alias available in 2.7.3, to output on build relative paths for web_modules. This all works correctly wrt to the paths.
e.g. I now import as
import { LitElement, html, css } from '@modules/lit-element';
in a filesrc/subdir/file.js
and it builds toimport{LitElement as a,html as b,css as c}from"../../web_modules/lit-element.js";
I went through the project and replaced ALL the web_module imports from
@xxx/yyy
to@modules/xxx/yyy
Running in
dev
mode works, web_modules and the files are served.However, when I do a build, it no longer writes out ANY code in the web_modules directory, the directory isn't even created.
Beta Was this translation helpful? Give feedback.
All reactions