-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwebpack.base.conf.cjs
More file actions
49 lines (46 loc) · 1.34 KB
/
webpack.base.conf.cjs
File metadata and controls
49 lines (46 loc) · 1.34 KB
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
44
45
46
47
48
49
const path = require('path');
const eslintFriendlyFormatter = require('eslint-friendly-formatter');
const ESLintPlugin = require('eslint-webpack-plugin');
const pkg = require('../package.json');
const namespace = 'NetLicensing';
function resolve(dir) {
return path.join(__dirname, '..', dir);
}
module.exports = {
context: path.resolve(__dirname, '../'),
output: {
path: path.resolve(__dirname, '../dist'),
filename: '[name].js',
library: namespace,
libraryTarget: 'umd',
umdNamedDefine: true,
globalObject: 'this',
},
resolve: {
extensions: ['.js', '.json'],
alias: {
'@': resolve('src'),
'test@': resolve('test'),
},
},
module: {
rules: [
{
test: /\.js$/,
loader: 'babel-loader',
exclude: /node_modules/,
include: [resolve('src'), resolve('test')],
},
// {
// test: /(\.jsx|\.js)$/,
// loader: 'eslint-loader',
// include: [resolve('src'), resolve('test')],
// options: {
// formatter: eslintFriendlyFormatter,
// emitWarning: true,
// },
// },
],
},
plugins: [new ESLintPlugin()],
};