@@ -71,6 +71,11 @@ const config = async (env): Promise<Configuration> => {
71
71
} ,
72
72
] ,
73
73
74
+ // Support WebAssembly according to latest spec - makes WebAssembly module async
75
+ experiments : {
76
+ asyncWebAssembly : true ,
77
+ } ,
78
+
74
79
mode : env . production ? 'production' : 'development' ,
75
80
76
81
module : {
@@ -82,7 +87,7 @@ const config = async (env): Promise<Configuration> => {
82
87
loader : 'swc-loader' ,
83
88
options : {
84
89
jsc : {
85
- baseUrl : path . resolve ( __dirname , 'src' ) ,
90
+ baseUrl : path . resolve ( process . cwd ( ) , SOURCE_DIR ) ,
86
91
target : 'es2015' ,
87
92
loose : false ,
88
93
parser : {
@@ -155,7 +160,7 @@ const config = async (env): Promise<Configuration> => {
155
160
{ from : 'img/**/*' , to : '.' , noErrorOnMissing : true } , // Optional
156
161
{ from : 'libs/**/*' , to : '.' , noErrorOnMissing : true } , // Optional
157
162
{ from : 'static/**/*' , to : '.' , noErrorOnMissing : true } , // Optional
158
- { from : '**/query_help.md' , to : '.' , noErrorOnMissing : true } , // Optional
163
+ { from : '**/query_help.md' , to : '.' , noErrorOnMissing : true } , // Optional
159
164
] ,
160
165
} ) ,
161
166
// Replace certain template-variables in the README and plugin.json
@@ -179,18 +184,20 @@ const config = async (env): Promise<Configuration> => {
179
184
] ,
180
185
} ,
181
186
] ) ,
182
- new ForkTsCheckerWebpackPlugin ( {
183
- async : Boolean ( env . development ) ,
184
- issue : {
185
- include : [ { file : '**/*.{ts,tsx}' } ] ,
186
- } ,
187
- typescript : { configFile : path . join ( process . cwd ( ) , 'tsconfig.json' ) } ,
188
- } ) ,
189
- new ESLintPlugin ( {
190
- extensions : [ '.ts' , '.tsx' ] ,
191
- lintDirtyModulesOnly : Boolean ( env . development ) , // don't lint on start, only lint changed files
192
- } ) ,
193
- ...( env . development ? [ new LiveReloadPlugin ( ) ] : [ ] ) ,
187
+ ...( env . development ? [
188
+ new LiveReloadPlugin ( ) ,
189
+ new ForkTsCheckerWebpackPlugin ( {
190
+ async : Boolean ( env . development ) ,
191
+ issue : {
192
+ include : [ { file : '**/*.{ts,tsx}' } ] ,
193
+ } ,
194
+ typescript : { configFile : path . join ( process . cwd ( ) , 'tsconfig.json' ) } ,
195
+ } ) ,
196
+ new ESLintPlugin ( {
197
+ extensions : [ '.ts' , '.tsx' ] ,
198
+ lintDirtyModulesOnly : Boolean ( env . development ) , // don't lint on start, only lint changed files
199
+ } ) ,
200
+ ] : [ ] ) ,
194
201
] ,
195
202
196
203
resolve : {
0 commit comments