Replies: 2 comments 2 replies
-
what would be a use case to manipulate binary files for the dev server? |
Beta Was this translation helpful? Give feedback.
2 replies
-
A few thoughts:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
In
snowpack build
, we pass binary files toload()
andtransform()
in plugins, as well as try and parse those files for imports to install. But should we stop doing this, and just decide that if a file is binary, we don’t send it to any plugins?The pros to this approach would be performance and memory usage: by simply skipping many files, we could deal with less headache and memory problems by not loading potentially-gigantic files in memory.
But the cons would be utility—by omitting binary files it would mean that if people wanted to do some kind of transformation to binary files (e.g. image optimizer), that would have to all happen at the
bundle()
step, which means you couldn’t manipulate binary files for the dev server at all.It should be noted that this is a companion discussion to the work happening here: #980
Any thoughts?
cc @gr2m @FredKSchott
Beta Was this translation helpful? Give feedback.
All reactions