File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55 checkTypeScript ,
66 watchCheckTypeScript ,
77 cleanOutput ,
8+ copyWasmFiles ,
89} from "./typescript" ;
910import { compileTextMateGrammar } from "./textmate" ;
1011import { compileView , watchView } from "./webpack" ;
@@ -15,6 +16,7 @@ export const buildWithoutPackage = series(
1516 cleanOutput ,
1617 parallel (
1718 compileEsbuild ,
19+ copyWasmFiles ,
1820 checkTypeScript ,
1921 compileTextMateGrammar ,
2022 compileView ,
@@ -30,6 +32,7 @@ export {
3032 watchCheckTypeScript ,
3133 watchView ,
3234 compileEsbuild ,
35+ copyWasmFiles ,
3336 checkTypeScript ,
3437 injectAppInsightsKey ,
3538 compileView ,
Original file line number Diff line number Diff line change @@ -67,3 +67,13 @@ export function checkTypeScript() {
6767export function watchCheckTypeScript ( ) {
6868 watch ( "src/**/*.ts" , checkTypeScript ) ;
6969}
70+
71+ export function copyWasmFiles ( ) {
72+ // We need to copy this file for the source-map package to work. Without this fie, the source-map
73+ // package is not able to load the WASM file because we are not including the full node_modules
74+ // directory. In version 0.7.4, it is not possible to call SourceMapConsumer.initialize in Node environments
75+ // to configure the path to the WASM file. So, source-map will always load the file from `__dirname/mappings.wasm`.
76+ // In version 0.8.0, it may be possible to do this properly by calling SourceMapConsumer.initialize by
77+ // using the "browser" field in source-map's package.json to load the WASM file from a given file path.
78+ return src ( "node_modules/source-map/lib/mappings.wasm" ) . pipe ( dest ( "out" ) ) ;
79+ }
Original file line number Diff line number Diff line change 13321332 },
13331333 "scripts" : {
13341334 "build" : " gulp" ,
1335- "watch" : " npm-run-all -p watch:*" ,
1336- "watch:extension" : " tsc --watch" ,
1337- "watch:webpack" : " gulp watchView" ,
1335+ "watch" : " gulp watch" ,
13381336 "test" : " npm-run-all -p test:*" ,
13391337 "test:unit" : " cross-env TZ=UTC LANG=en-US jest --projects test/unit-tests" ,
13401338 "test:view" : " jest --projects src/view" ,
You can’t perform that action at this time.
0 commit comments