-
Notifications
You must be signed in to change notification settings - Fork 1
/
webpack.config.js
40 lines (39 loc) · 965 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
var pkg = require('./package.json');
var webpack = require('webpack');
var path = require('path')
module.exports = {
devtool: false,
entry: {
vconsole : './src/index.js'
},
module: {
rules: [
{
test: /\.js$/,
exclude: /(node_modules|bower_components)/,
use: {
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env'],
plugins: [require('@babel/plugin-proposal-class-properties')]
}
}
},
{
test: /\.less$/, use: ['style-loader', 'css-loader', 'less-loader']
}
]
},
output: {
path: path.join(__dirname, './dist'),
filename: 'vconsole-outputlog-plugin.min.js'
},
plugins:[
new webpack.BannerPlugin([
pkg.name + ' v' + pkg.version + ' (' + pkg.homepage + ')',
'Copyright ' + new Date().getFullYear() + ', ' + pkg.author,
pkg.license + ' license'
].join('\n')
)
]
};