All files / wdclib webpack.config.babel.js

0% Statements 0/4
100% Branches 0/0
100% Functions 0/0
0% Lines 0/4
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                                                                               
 
// 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
};