Skip to content

Commit 1ed6582

Browse files
committed
fix: resolve one_ini_bg.wasm missing error
1 parent f8318de commit 1ed6582

File tree

3 files changed

+38
-32
lines changed

3 files changed

+38
-32
lines changed

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
{

yarn.lock

Lines changed: 26 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1374,6 +1374,18 @@ concat-map@0.0.1:
13741374
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
13751375
integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==
13761376

1377+
copy-webpack-plugin@^12.0.2:
1378+
version "12.0.2"
1379+
resolved "https://registry.yarnpkg.com/copy-webpack-plugin/-/copy-webpack-plugin-12.0.2.tgz#935e57b8e6183c82f95bd937df658a59f6a2da28"
1380+
integrity sha512-SNwdBeHyII+rWvee/bTnAYyO8vfVdcSTud4EIb6jcZ8inLeWucJE0DnxXQBjlQ5zlteuuvooGQy3LIyGxhvlOA==
1381+
dependencies:
1382+
fast-glob "^3.3.2"
1383+
glob-parent "^6.0.1"
1384+
globby "^14.0.0"
1385+
normalize-path "^3.0.0"
1386+
schema-utils "^4.2.0"
1387+
serialize-javascript "^6.0.2"
1388+
13771389
core-util-is@~1.0.0:
13781390
version "1.0.3"
13791391
resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85"
@@ -1787,7 +1799,7 @@ fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3:
17871799
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525"
17881800
integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==
17891801

1790-
fast-glob@^3.3.3:
1802+
fast-glob@^3.3.2, fast-glob@^3.3.3:
17911803
version "3.3.3"
17921804
resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.3.tgz#d06d585ce8dba90a16b0505c543c3ccfb3aeb818"
17931805
integrity sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==
@@ -1971,6 +1983,13 @@ glob-parent@^5.1.2, glob-parent@~5.1.2:
19711983
dependencies:
19721984
is-glob "^4.0.1"
19731985

1986+
glob-parent@^6.0.1:
1987+
version "6.0.2"
1988+
resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3"
1989+
integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==
1990+
dependencies:
1991+
is-glob "^4.0.3"
1992+
19741993
glob-to-regexp@^0.4.1:
19751994
version "0.4.1"
19761995
resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e"
@@ -2032,7 +2051,7 @@ globalthis@^1.0.2:
20322051
define-properties "^1.2.1"
20332052
gopd "^1.0.1"
20342053

2035-
globby@^14.1.0:
2054+
globby@^14.0.0, globby@^14.1.0:
20362055
version "14.1.0"
20372056
resolved "https://registry.yarnpkg.com/globby/-/globby-14.1.0.tgz#138b78e77cf5a8d794e327b15dce80bf1fb0a73e"
20382057
integrity sha512-0Ia46fDOaT7k4og1PDW4YbodWWr3scS2vAr2lTbsplOt2WkKp0vQbkI9wKis/T5LV/dqPjO3bpS/z6GTJB82LA==
@@ -2292,7 +2311,7 @@ is-fullwidth-code-point@^4.0.0:
22922311
resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz#fae3167c729e7463f8461ce512b080a49268aa88"
22932312
integrity sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==
22942313

2295-
is-glob@^4.0.1, is-glob@~4.0.1:
2314+
is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1:
22962315
version "4.0.3"
22972316
resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084"
22982317
integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==
@@ -3436,7 +3455,7 @@ schema-utils@^3.2.0:
34363455
ajv "^6.12.5"
34373456
ajv-keywords "^3.5.2"
34383457

3439-
schema-utils@^4.3.0:
3458+
schema-utils@^4.2.0, schema-utils@^4.3.0:
34403459
version "4.3.2"
34413460
resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-4.3.2.tgz#0c10878bf4a73fd2b1dfd14b9462b26788c806ae"
34423461
integrity sha512-Gn/JaSk/Mt9gYubxTtSn/QCV4em9mpAPiR1rqy/Ocu19u/G9J5WWdNoUT4SiV6mFC3y6cxyFcFwdzPM3FgxGAQ==
@@ -3647,16 +3666,7 @@ string-argv@0.3.2:
36473666
resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.3.2.tgz#2b6d0ef24b656274d957d54e0a4bbf6153dc02b6"
36483667
integrity sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==
36493668

3650-
"string-width-cjs@npm:string-width@^4.2.0":
3651-
version "4.2.3"
3652-
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
3653-
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
3654-
dependencies:
3655-
emoji-regex "^8.0.0"
3656-
is-fullwidth-code-point "^3.0.0"
3657-
strip-ansi "^6.0.1"
3658-
3659-
string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
3669+
"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
36603670
version "4.2.3"
36613671
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
36623672
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
@@ -3688,14 +3698,7 @@ string_decoder@~1.1.1:
36883698
dependencies:
36893699
safe-buffer "~5.1.0"
36903700

3691-
"strip-ansi-cjs@npm:strip-ansi@^6.0.1":
3692-
version "6.0.1"
3693-
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
3694-
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
3695-
dependencies:
3696-
ansi-regex "^5.0.1"
3697-
3698-
strip-ansi@^6.0.0, strip-ansi@^6.0.1:
3701+
"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1:
36993702
version "6.0.1"
37003703
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
37013704
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
@@ -4179,16 +4182,7 @@ workerpool@6.2.1:
41794182
resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.1.tgz#46fc150c17d826b86a008e5a4508656777e9c343"
41804183
integrity sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==
41814184

4182-
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0":
4183-
version "7.0.0"
4184-
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
4185-
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
4186-
dependencies:
4187-
ansi-styles "^4.0.0"
4188-
string-width "^4.1.0"
4189-
strip-ansi "^6.0.0"
4190-
4191-
wrap-ansi@^7.0.0:
4185+
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0:
41924186
version "7.0.0"
41934187
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
41944188
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==

0 commit comments

Comments
 (0)