forked from intoli/antd-scss-theme-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
43 lines (37 loc) · 852 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
42
43
const path = require('path');
const nodeExternals = require('webpack-node-externals');
const packageJson = require('./package.json');
const webpackConfig = {
devtool: 'cheap-module-source-map',
entry: path.join(__dirname, 'src', 'index.js'),
externals: [
nodeExternals(),
'antd',
'less',
'less-loader',
'sass-loader',
],
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
enforce: 'pre',
loader: 'eslint-loader',
},
{
test: /\.js$/,
exclude: /node_modules/,
loader: 'babel-loader',
},
],
},
output: {
path: path.join(__dirname, 'build', 'dev'),
filename: `${packageJson.name}.js`,
library: 'AntdScssThemePlugin',
libraryTarget: 'commonjs',
},
target: 'node',
};
module.exports = webpackConfig;