File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -89,12 +89,12 @@ class Server {
89
89
if ( options . lazy && ! options . filename ) {
90
90
throw new Error ( "'filename' option must be set in lazy mode." ) ;
91
91
}
92
-
92
+
93
93
// if the user enables http2, we can safely enable https
94
94
if ( options . http2 && ! options . https ) {
95
95
options . https = true ;
96
96
}
97
-
97
+
98
98
updateCompiler ( compiler , options ) ;
99
99
100
100
this . stats =
@@ -174,7 +174,14 @@ class Server {
174
174
175
175
// ref: https://github.com/webpack/webpack-dev-server/issues/1575
176
176
// remove this when send@^0.16.3
177
- express . static . mime . types . wasm = 'application/wasm' ;
177
+ if (
178
+ express . static &&
179
+ express . static . mime &&
180
+ express . static . mime . types &&
181
+ ! express . static . mime . types . wasm
182
+ ) {
183
+ express . static . mime . types . wasm = 'application/wasm' ;
184
+ }
178
185
179
186
app . all ( '*' , ( req , res , next ) => {
180
187
if ( this . checkHost ( req . headers ) ) {
You can’t perform that action at this time.
0 commit comments