You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am on the latest version of Snowpack & all plugins.
I use package manager npm (Fill in: npm, yarn, pnpm, etc).
I run Snowpack on OS Mac (Fill in: Windows, Mac, Linux, etc).
I run Snowpack on Node.js v12+
Describe the bug
If you enable bundling through the built-in optimize.bundle, assets will not get proxies generated/their imports changed. E.g. they end up just as-is: import logo from "./logo.svg"; -> import logo from "./logo.svg";
which naturally leads to errors in the browser.
If you leave bundle: false things work as expected: import logo from "./logo.svg"; -> import logo from "./logo.svg.proxy.js";
To Reproduce
We can't fix bugs that we can't see for ourselves. Issues often need to be closed if this section is skipped.
Bug Report Quick Checklist
Describe the bug
If you enable bundling through the built-in optimize.bundle, assets will not get proxies generated/their imports changed. E.g. they end up just as-is:
import logo from "./logo.svg";
->import logo from "./logo.svg";
which naturally leads to errors in the browser.
If you leave
bundle: false
things work as expected:import logo from "./logo.svg";
->import logo from "./logo.svg.proxy.js";
To Reproduce
We can't fix bugs that we can't see for ourselves. Issues often need to be closed if this section is skipped.
npx create-snowpack-app new-dir --template @snowpack/app-template-react-typescript
optimize.bundle
totrue
in thesnowpack.config.js
npm run build
index.js
, search for.svg
and you'll find the SVG import as raw.Expected behavior
I'm guessing at the very least, that there should be proxies generated and the imports should be swapped.
Anything else?
I'm not sure if this worked as intended in 3.0.
The text was updated successfully, but these errors were encountered: