Closed canadaduane closed 2 years ago
I think I may have a partial answer to my question: It looks like there is a bug in the current version of snowpack that prevents files from being copied when they are binary/buffer type objects: https://github.com/pikapkg/snowpack/pull/1313#issuecomment-708698874
maybe the cache of snowpack...
enter root of your project, try to use commands:
$ rm -rf ./build
$ npx snowpack dev --reload
I apologize for all the questions haha. I'm trying to see if
snowpack-plugin-inliner
will work in our case.I'm considering using this plugin for CSS. For example, our CSS has relative URLs--relative to each component. I'd like to transform the CSS in a component sub-folder like this:
into
Of course, when
icon.png
is below a certain size threshold, then it would be inlined as adata:
URI.So my question is, why does
snowpack-plugin-inliner
copy files at all? I'm new to snowpack, but it seems snowpack copies all files in my components' sub-folders.For example, if I have files in
src/components/*
snowpack automatically copies them tobuild/_dist_/components/*
when building, or hosts them on the dev server at_dist_/components/*
when in development mode. So, no need to copy?