Skip to content

Commit e3f8acf

Browse files
committed
webpack: fix dev setup (proxy all non-bundle requests)
1 parent 3bf5f64 commit e3f8acf

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

webpack.config.js

+9-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@ const path = require('path')
22

33
module.exports = {
44
context: path.join(__dirname),
5-
entry: {client: './src/client/app.js', admin: './src/admin/app.js', terminal: './src/terminal/app.js'},
5+
entry: {
6+
client: './src/client/app.js',
7+
admin: './src/admin/app.js',
8+
terminal: './src/terminal/app.js'
9+
},
610
output: {
711
filename: '[name].bundle.js',
812
path: path.join(__dirname, 'static', 'strecku'),
@@ -26,7 +30,8 @@ module.exports = {
2630
exclude: /node_modules/,
2731
options: {presets: ['env']}
2832
},
29-
{test: /\.css$/, use: ['style-loader', 'css-loader']}, {
33+
{
34+
test: /\.css$/, use: ['style-loader', 'css-loader']}, {
3035
test: /\.(png|jpg|gif|svg)$/,
3136
loader: 'file-loader',
3237
options: {name: '[name].[ext]?[hash]'}
@@ -42,10 +47,10 @@ module.exports = {
4247
devServer: {
4348
historyApiFallback: true,
4449
publicPath: '/',
45-
contentBase: ['./static/strecku', './static/strecku/terminal'],
50+
contentBase: false,
4651
noInfo: true,
4752
proxy: [{
48-
context: ['/api', '/admin', '/login', '/logout', '/signup', '/update', '/activate', '/confirm', '/socket.io'],
53+
context: ['!**/*.bundle.js'],
4954
target: 'http://localhost:5100',
5055
}],
5156
host: '0.0.0.0'

0 commit comments

Comments
 (0)