Skip to content

Commit

Permalink
fix: update to webpack v5 support for wasm
Browse files Browse the repository at this point in the history
  • Loading branch information
starpit committed Apr 20, 2023
1 parent 89f62ff commit 2ca0ff9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.
10 changes: 3 additions & 7 deletions packages/webpack/headless-webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,9 @@ const config = (
extensions: ['.tsx', '.ts', '.js']
},
experiments: {
topLevelAwait: true
topLevelAwait: true,
asyncWebAssembly: true,
syncWebAssembly: true
},
watchOptions: {
// here we ignore changes to any node_modules, except we want to
Expand All @@ -212,12 +214,6 @@ const config = (
optimization,
module: {
rules: kuiPluginRules.concat([
// handle WASM loading
{
test: /\.wasm$/,
type: 'asset/inline'
},

{
test: /\.node$/,
loader: 'node-loader',
Expand Down
10 changes: 3 additions & 7 deletions packages/webpack/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,9 @@ module.exports = {
}
}, */
experiments: {
topLevelAwait: true
topLevelAwait: true,
asyncWebAssembly: true,
syncWebAssembly: true
},
watchOptions: {
// here we ignore changes to any node_modules, except we want to
Expand Down Expand Up @@ -506,12 +508,6 @@ module.exports = {
optimization,
module: {
rules: kuiPluginRules.concat([
// handle WASM loading
{
test: /\.wasm$/,
type: 'asset/inline'
},

// patternfly has some huge image assets for demos; we can't use IgnorePlugin, because about-modal-box.css uses this demo image. sigh
{
test: new RegExp(
Expand Down

0 comments on commit 2ca0ff9

Please sign in to comment.