We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7a3a257 commit fadae5dCopy full SHA for fadae5d
3 files changed
lib/Server.js
@@ -132,6 +132,10 @@ function Server (compiler, options = {}, _log) {
132
// eslint-disable-next-line
133
const app = this.app = new express();
134
135
+ // ref: https://github.com/webpack/webpack-dev-server/issues/1575
136
+ // remove this when send@^0.16.3
137
+ express.static.mime.types.wasm = 'application/wasm';
138
+
139
app.all('*', (req, res, next) => {
140
if (this.checkHost(req.headers)) {
141
return next();
test/ContentBase.test.js
@@ -121,4 +121,18 @@ describe('ContentBase', () => {
121
.expect(404, done);
122
});
123
124
125
+ describe('Content type', () => {
126
+ before((done) => {
127
+ server = helper.start(config, {
128
+ contentBase: [contentBasePublic]
129
+ }, done);
130
+ req = request(server.app);
131
+ });
+ it('Request foo.wasm', (done) => {
+ req.get('/foo.wasm')
+ .expect('Content-Type', 'application/wasm', done);
test/fixtures/contentbase-config/public/foo.wasm
0 commit comments