-
Notifications
You must be signed in to change notification settings - Fork 20
/
webpack.config.babel.js
49 lines (48 loc) · 1.31 KB
/
webpack.config.babel.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
44
45
46
47
48
49
import path from 'path';
import fs from 'fs';
import { BannerPlugin } from 'webpack';
import nodeExternals from 'webpack-node-externals';
import bowerExternals from 'webpack-bower-externals';
export default {
entry: './src/main.js',
output: {
path: path.resolve('./dist'),
filename: 'spel2js.js',
library: 'spel2js',
libraryTarget: 'umd'
},
externals: [bowerExternals(), nodeExternals()],
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
use: [
{
loader: 'babel-loader',
},
],
},
// TODO (BHM 9/26/17): implement ESLint before 1.0.0
/*{
test: /\.js$/,
enforce: 'pre',
exclude: /node_modules|build/,
use: [
{
loader: 'eslint-loader',
options: {
fix: false,
},
},
],
},*/
],
},
plugins: [
new BannerPlugin({
banner: fs.readFileSync(path.resolve('./license-banner.txt'), 'utf-8'),
raw: true
})
],
};