Closed JoeMethven closed 2 years ago
Fixed it, looking at the source code:
plugin.js
const defaultLimit = 10240;
const defaultEncoding = 'base64';
async function encode(file, name, { limit = defaultLimit, bufferEncoding = defaultEncoding }) {
The plugin was set to a 10KB limit, but this was not documented anywhere. I recommend documenting this and improving the error if limit is exceeded. It might be better to have no limit by default? (like webpack url-loader).
Could you please investigate why png/jpg files are failing to be inlined, I just get this error:
no such file or directory, copyfile
I have not configured the plugin in any way, just defined the plugin as a string in the array.
Using snowpack-plugin-inliner
Using snowpack-plugin-url-loader
snowpack.config