Skip to content
This repository was archived by the owner on Mar 29, 2025. It is now read-only.

Commit 398e129

Browse files
author
Valentin
committed
CCP-2118 update webpack config
1 parent bfee7e8 commit 398e129

File tree

1 file changed

+27
-34
lines changed

1 file changed

+27
-34
lines changed

webpack.config.js

Lines changed: 27 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,57 @@
1-
const path = require('path');
2-
const webpack = require('webpack');
3-
const HtmlWebpackPlugin = require('html-webpack-plugin');
1+
const path = require("path");
2+
const webpack = require("webpack");
3+
const HtmlWebpackPlugin = require("html-webpack-plugin");
44

55
try {
6-
require('os').networkInterfaces()
6+
require("os").networkInterfaces();
77
} catch (e) {
8-
require('os').networkInterfaces = () => ({})
8+
require("os").networkInterfaces = () => ({});
99
}
1010

1111
module.exports = {
12-
entry: [
13-
'./src/app/index.js',
14-
],
12+
entry: ["./src/app/index.js"],
1513
devServer: {
1614
port: 8081,
17-
https: false,
15+
https: true,
1816
disableHostCheck: true,
19-
host: 'localhost',
17+
host: "0.0.0.0",
2018
},
2119
module: {
22-
loaders: [
20+
rules: [
2321
{
2422
test: /.js?$/,
25-
loaders: ['babel-loader'],
23+
use: "babel-loader",
2624
exclude: /node_modules/,
2725
include: path.resolve(__dirname),
2826
},
2927
{
30-
test: /\.less$/,
31-
loaders: ["style-loader", "css-loader", "less-loader"]
32-
}, {
33-
test: /\.css$/,
34-
loaders: ["style-loader", "css-loader"]
28+
test: /\.css/,
29+
use: ["style-loader", "css-loader"],
3530
},
3631
{
3732
test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/,
38-
loader: "url-loader?limit=10000&mimetype=application/octet-stream"
39-
}, {
33+
use: "url-loader?limit=10000&mimetype=application/octet-stream",
34+
},
35+
{
4036
test: /\.eot(\?v=\d+\.\d+\.\d+)?$/,
41-
loader: "file-loader"
42-
}, {
37+
use: "file-loader",
38+
},
39+
{
4340
test: /\.svg(\?v=\d+\.\d+\.\d+)?$/,
44-
loader: "url-loader?limit=10000&mimetype=image/svg+xml"
45-
}, {
41+
use: "url-loader?limit=10000&mimetype=image/svg+xml",
42+
},
43+
{
4644
test: /\.(jpg|jpeg|gif|png)$/,
4745
exclude: /node_modules/,
48-
loader: 'url-loader?limit=65000&name=images/[name].[ext]'
49-
}
50-
]
46+
use: "url-loader?limit=65000&name=images/[name].[ext]",
47+
},
48+
],
5149
},
5250
plugins: [
53-
new webpack.DefinePlugin({
54-
'process.env': {
55-
'NODE_ENV': `""`
56-
}
57-
}),
5851
new HtmlWebpackPlugin({
5952
inject: true,
60-
template: './public/index.html'
53+
template: "./public/index.html",
6154
}),
62-
new webpack.NoEmitOnErrorsPlugin()
63-
]
55+
new webpack.NoEmitOnErrorsPlugin(),
56+
],
6457
};

0 commit comments

Comments
 (0)