File tree Expand file tree Collapse file tree 4 files changed +25
-2
lines changed
Expand file tree Collapse file tree 4 files changed +25
-2
lines changed Original file line number Diff line number Diff line change 11node_modules /
22worker /worker.js
3+ worker /mappings.wasm
34fixtures /app /static
45yarn-error.log
Original file line number Diff line number Diff line change 33 "version" : " 1.0.1" ,
44 "main" : " worker.js" ,
55 "files" : [
6- " worker.js"
6+ " worker.js" ,
7+ " mappings.wasm"
78 ],
89 "scripts" : {
9- "prepare" : " webpack-cli"
10+ "prepare" : " webpack-cli && node scripts/copy-wasm.js "
1011 },
1112 "devDependencies" : {
1213 "css-to-js-sourcemap-core" : " *" ,
14+ "resolve-from" : " ^4.0.0" ,
1315 "webpack" : " ^4.10.2" ,
1416 "webpack-cli" : " ^2.1.4"
1517 },
Original file line number Diff line number Diff line change 1+ /* eslint-env node */
2+
3+ const path = require ( "path" ) ;
4+ const fs = require ( "fs" ) ;
5+ const resolveFrom = require ( "resolve-from" ) ;
6+
7+ const corePath = path . dirname ( require . resolve ( "css-to-js-sourcemap-core" ) ) ;
8+
9+ const wasmPath = path . join (
10+ path . dirname ( resolveFrom ( corePath , "source-map" ) ) ,
11+ "lib/mappings.wasm" ,
12+ ) ;
13+
14+ fs . createReadStream ( wasmPath ) . pipe (
15+ fs . createWriteStream ( path . resolve ( __dirname , "../mappings.wasm" ) ) ,
16+ ) ;
Original file line number Diff line number Diff line change @@ -4207,6 +4207,10 @@ resolve-from@^3.0.0:
42074207 version "3.0.0"
42084208 resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748"
42094209
4210+ resolve-from@^4.0.0 :
4211+ version "4.0.0"
4212+ resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6"
4213+
42104214resolve-url@^0.2.1 :
42114215 version "0.2.1"
42124216 resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a"
You can’t perform that action at this time.
0 commit comments