forked from SuperTux88/k8s-info
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
41 lines (39 loc) · 899 Bytes
/
webpack.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
const path = require('path');
const ManifestPlugin = require('webpack-manifest-plugin');
const config = {
entry: {
index: path.resolve(__dirname, 'react/index.jsx'),
fonts: path.resolve(__dirname, 'react/fonts.js'),
},
output: {
path: path.resolve(__dirname, 'app/static/js'),
filename: '[name].[chunkhash].js',
},
resolve: {
extensions: ['.js', '.jsx'],
},
module: {
rules: [
{
test: /\.jsx?$/,
exclude: /node_modules/,
use: 'babel-loader',
},
{
test: /\.css$/,
use: ['style-loader', 'css-loader'],
},
{
test: /\.(png|woff|woff2|eot|ttf|svg)$/,
use: 'url-loader?limit=100000',
},
],
},
plugins: [
new ManifestPlugin({
fileName: path.resolve(__dirname, 'app/manifest.json'),
publicPath: '/static/js/',
}),
],
};
module.exports = config;