forked from external-repos/squoosh
Update paths
This commit is contained in:
@@ -3,7 +3,8 @@ import initOxiPNG, {
|
|||||||
start_main_thread,
|
start_main_thread,
|
||||||
optimise,
|
optimise,
|
||||||
} from './pkg-parallel';
|
} from './pkg-parallel';
|
||||||
import wasmUrl from './pkg-parallel/oxipng_bg.wasm';
|
// @ts-ignore
|
||||||
|
import wasmUrl from './pkg-parallel/squoosh_oxipng_bg.wasm';
|
||||||
import { WorkerInit } from './worker';
|
import { WorkerInit } from './worker';
|
||||||
|
|
||||||
function initWorker(worker: Worker, workerInit: WorkerInit) {
|
function initWorker(worker: Worker, workerInit: WorkerInit) {
|
||||||
|
|||||||
@@ -149,7 +149,7 @@ module.exports = async function(_, env) {
|
|||||||
{
|
{
|
||||||
// Emscripten modules don't work with Webpack's Wasm loader.
|
// Emscripten modules don't work with Webpack's Wasm loader.
|
||||||
test: /\.wasm$/,
|
test: /\.wasm$/,
|
||||||
exclude: /(?<!oxipng)_bg\.wasm$/,
|
exclude: /(?<!\bsquoosh_oxipng)_bg\.wasm$/,
|
||||||
// This is needed to make webpack NOT process wasm files.
|
// This is needed to make webpack NOT process wasm files.
|
||||||
// See https://github.com/webpack/webpack/issues/6725
|
// See https://github.com/webpack/webpack/issues/6725
|
||||||
type: 'javascript/auto',
|
type: 'javascript/auto',
|
||||||
@@ -160,7 +160,7 @@ module.exports = async function(_, env) {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
// Wasm modules generated by Rust + wasm-pack work great with Webpack.
|
// Wasm modules generated by Rust + wasm-pack work great with Webpack.
|
||||||
test: /(?<!oxipng)_bg\.wasm$/,
|
test: /(?<!\bsquoosh_oxipng)_bg\.wasm$/,
|
||||||
type: 'webassembly/experimental',
|
type: 'webassembly/experimental',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user