Skip to content

Commit 8bbc296

Browse files
committed
fix: resolve one_ini_bg.wasm missing error
1 parent 95d7306 commit 8bbc296

3 files changed

Lines changed: 217 additions & 5 deletions

File tree

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@
194194
"devDependencies": {
195195
"@types/mocha": "10.0.1",
196196
"@types/node": "18.16.19",
197+
"copy-webpack-plugin": "^12.0.2",
197198
"husky": "8.0.3",
198199
"lint-staged": "13.3.0",
199200
"mocha": "10.2.0",

webpack.config.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
'use strict';
99

1010
const path = require('path');
11+
const copyFilePlugin = require('copy-webpack-plugin');
1112

1213
/**@type {import('webpack').Configuration}*/
1314
const config = {
@@ -29,6 +30,16 @@ const config = {
2930
// support reading TypeScript and JavaScript files, 📖 -> https://github.com/TypeStrong/ts-loader
3031
extensions: ['.ts', '.js'],
3132
},
33+
plugins: [
34+
new copyFilePlugin({
35+
patterns: [
36+
{
37+
from: path.resolve(__dirname, 'node_modules/@one-ini/wasm/one_ini_bg.wasm'),
38+
to: path.resolve(__dirname, 'dist'),
39+
},
40+
],
41+
}),
42+
],
3243
module: {
3344
rules: [
3445
{

0 commit comments

Comments
 (0)