Replies: 1 comment 1 reply
-
Background: The reason that we have this unique I'd love to support these secondary extensions in plugins if it doesn't mess with that story. The basic premise would be:
I think that's all that's needed! That feels totally doable, and would still give us a deterministic two-directional mapping from src file path <> dist URL. Is anyone interested in contributing this support? Would love a PR! |
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.
-
Today, if you try to use the structure below:
/plugin/my-html-loader.js
/snowpack.config.json
/src/comp/foo/foo.html
/src/comp/foo/foo.js
If you run
snowpack build
, the files are built as below:/build/_dist_/comp/foo/foo.js
/build/_dist_/comp/foo/foo.html.js
However,
snowpack dev
fails to load the/_dist_/comp/foo/foo.html.js
because it searchs the plugins that output.js
files, and not.html.js
. I modified my local copy of snowpack to search these "secondary extensions" in the pluginsresolve
property.Could any issues arise if these changes became official part of snowpack?
Beta Was this translation helpful? Give feedback.
All reactions