mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-16 18:49:50 +00:00
Wrangling TypeScript and webpack to work with Emscripten wasm stuff
This commit is contained in:
@@ -107,10 +107,17 @@ module.exports = function (_, env) {
|
||||
loader: 'babel-loader',
|
||||
// Don't respect any Babel RC files found on the filesystem:
|
||||
options: Object.assign(readJson('.babelrc'), { babelrc: false })
|
||||
},
|
||||
{
|
||||
// All the codec files define a global with the same name as their file name. `exports-loader` attaches those to `module.exports`.
|
||||
test: /\/codec\/.*\.js$/,
|
||||
loader: 'exports-loader',
|
||||
}
|
||||
]
|
||||
},
|
||||
plugins: [
|
||||
// Ignore some of the native Node modules for any of the codecs. These files are generated by Emscripten and are supposed to also work in Node, which we don‘t care about.
|
||||
new webpack.IgnorePlugin(/(fs)/, /\/codecs\//),
|
||||
// Pretty progressbar showing build progress:
|
||||
new ProgressBarPlugin({
|
||||
format: '\u001b[90m\u001b[44mBuild\u001b[49m\u001b[39m [:bar] \u001b[32m\u001b[1m:percent\u001b[22m\u001b[39m (:elapseds) \u001b[2m:msg\u001b[22m\r',
|
||||
|
||||
Reference in New Issue
Block a user