Skip to content

Commit

Permalink
Update webpack config
Browse files Browse the repository at this point in the history
  • Loading branch information
AnastasiaSliusar committed Dec 5, 2024
1 parent 27adda5 commit eb0bbb4
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
"@types/react-addons-linked-state-mixin": "^0.14.22",
"@typescript-eslint/eslint-plugin": "^6.1.0",
"@typescript-eslint/parser": "^6.1.0",
"copy-webpack-plugin": "^10.0.0",
"css-loader": "^6.7.1",
"eslint": "^8.36.0",
"eslint-config-prettier": "^8.8.0",
Expand Down
30 changes: 29 additions & 1 deletion worker.webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@
const path = require('path');
const CopyPlugin = require('copy-webpack-plugin');

const occPath = [
__dirname,
'node_modules',
'@emscripten-forge/mambajs',
'node_modules',
'@emscripten-forge/untarjs',
'lib',
'unpack.wasm'
];
const staticPath = [
__dirname,
'jupyterlite_xeus',
'labextension',
'static',
'[name].wasm'
];

const rules = [
{
Expand Down Expand Up @@ -48,6 +66,16 @@ module.exports = [
rules
},
devtool: 'source-map',
resolve
resolve,
plugins: [
new CopyPlugin({
patterns: [
{
from: path.join(...occPath),
to: path.join(...staticPath)
}
]
})
]
}
];

0 comments on commit eb0bbb4

Please sign in to comment.