forked from Tabloids/wdclib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.babel.js
39 lines (34 loc) · 997 Bytes
/
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
// import webpack from 'webpack';
import { resolve } from 'path';
import { getBuildNumber } from './DevUtils/BuildNumber';
const BUILD_NUMBER = getBuildNumber({ showLog: true });
// const [MAYOR, MINOR, PATCH, ...rest] = BUILD_NUMBER.split('.');
console.log(`Building Version: ${BUILD_NUMBER}`);
export default {
devtool: 'cheap-module-inline-source-map',
entry: ['babel-polyfill', './index'],
output: {
path: resolve('dist'),
filename: 'bundle.js'
},
module: {
rules: [
{
enforce: 'pre',
test: /\.js$/,
loader: 'eslint-loader',
exclude: [
/node_modules/
]
},
{
test: /\.js?$/,
loader: 'babel-loader',
include: [
resolve('/')
]
}
]
},
plugins: [] // left to be extended by production build script
};