You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
520 B
15 lines
520 B
const webpack = require('webpack'); |
|
const middleware = require('webpack-dev-middleware'); |
|
const express = require('express'); |
|
const path = require('path'); |
|
const webpackConfig = require('./webpack.config.dev'); |
|
|
|
const compiler = webpack(webpackConfig); |
|
const app = express(); |
|
|
|
express.static.mime.types.wasm = 'application/wasm'; |
|
|
|
app.use('/', express.static(path.resolve(__dirname, '..'))); |
|
app.use(middleware(compiler, { publicPath: '/dist' })); |
|
|
|
app.listen(3000, () => console.log('Server is running on port 3000'));
|
|
|