mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-14 01:37:26 +00:00
Add feature detection to OxiPNG
This commit is contained in:
committed by
Ingvar Stepanyan
parent
02c113a68f
commit
bae243ccdb
@@ -149,7 +149,7 @@ module.exports = async function(_, env) {
|
||||
{
|
||||
// Emscripten modules don't work with Webpack's Wasm loader.
|
||||
test: /\.wasm$/,
|
||||
exclude: /(?<!\bsquoosh_oxipng)_bg\.wasm$/,
|
||||
exclude: /(?<!\bpkg-parallel[\\/]squoosh_oxipng)_bg\.wasm$/,
|
||||
// This is needed to make webpack NOT process wasm files.
|
||||
// See https://github.com/webpack/webpack/issues/6725
|
||||
type: 'javascript/auto',
|
||||
@@ -160,7 +160,7 @@ module.exports = async function(_, env) {
|
||||
},
|
||||
{
|
||||
// Wasm modules generated by Rust + wasm-pack work great with Webpack.
|
||||
test: /(?<!\bsquoosh_oxipng)_bg\.wasm$/,
|
||||
test: /(?<!\bpkg-parallel[\\/]squoosh_oxipng)_bg\.wasm$/,
|
||||
type: 'webassembly/experimental',
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user