const path = require('path');
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const OfflinePlugin = require('offline-plugin');
const CopyWebpackPlugin = require('copy-webpack-plugin');


module.exports = {
    entry: {
        main: './src/main.js',
        vendor: ['pixijs', 'eventemitter3']
    },
    output: {
        filename: '[name].[chunkhash].js',
        path: path.resolve(__dirname, 'dist')
    },
    module: {
        rules: [
            {
                test: /\.js$/,
                exclude: /node_modules/,
                loader: 'babel-loader',
                options: {
                    presets: [["es2015", {"modules": false}]]
                }
            },
            {
                test: /\.css$/,
                use: ExtractTextPlugin.extract({
                    use: 'css-loader'
                })
            },
            {
                test: /\.(jpg|png|svg)$/,
                loader: 'file-loader',
                options: {name: '[name].[hash].[ext]'},
            },
        ]
    },
    resolve: {
        alias: {
            pixijs: path.resolve(__dirname, 'node_modules/pixi.js'),
        }
    },
    plugins: [
        new HtmlWebpackPlugin({
            template: 'src/index.html.ejs'
        }),
        new ExtractTextPlugin('[name].[contenthash].css'),
        new webpack.optimize.CommonsChunkPlugin({
            names: ['vendor', 'manifest']
        }),
        CopyWebpackPlugin([
            {from: 'src/static', to: 'static'}
        ]),
        new OfflinePlugin({
            AppCache: false
        })
    ]
};

@@ -1,12 +1,33 @@
+/*eslint-env node*/%0A%0A
 const path =
@@ -39,14 +39,14 @@
 ire(
-'
+%22
 path
-'
+%22
 );%0Ac
@@ -72,17 +72,17 @@
 ire(
-'
+%22
 webpack
-'
+%22
 );%0Ac
@@ -114,17 +114,17 @@
 require(
-'
+%22
 html-web
@@ -126,33 +126,33 @@
 l-webpack-plugin
-'
+%22
 );%0Aconst Extract
@@ -172,17 +172,17 @@
 require(
-'
+%22
 extract-
@@ -196,25 +196,25 @@
 bpack-plugin
-'
+%22
 );%0Aconst Off
@@ -234,17 +234,17 @@
 require(
-'
+%22
 offline-
@@ -249,17 +249,17 @@
 e-plugin
-'
+%22
 );%0Aconst
@@ -287,17 +287,17 @@
 require(
-'
+%22
 copy-web
@@ -311,14 +311,13 @@
 ugin
-'
+%22
 );%0A%0A
-%0A
 modu
@@ -358,17 +358,17 @@
   main: 
-'
+%22
 ./src/ma
@@ -372,17 +372,17 @@
 /main.js
-'
+%22
 ,%0A      
@@ -396,19 +396,19 @@
 r: %5B
-'
+%22
 pixijs
-', '
+%22, %22
 even
@@ -416,17 +416,17 @@
 emitter3
-'
+%22
 %5D%0A    %7D,
@@ -454,25 +454,25 @@
   filename: 
-'
+%22
 %5Bname%5D.%5Bchun
@@ -480,17 +480,17 @@
 hash%5D.js
-'
+%22
 ,%0A      
@@ -525,14 +525,14 @@
 me, 
-'
+%22
 dist
-'
+%22
 )%0A  
@@ -677,17 +677,17 @@
 loader: 
-'
+%22
 babel-lo
@@ -686,25 +686,25 @@
 babel-loader
-'
+%22
 ,%0A          
@@ -935,17 +935,17 @@
    use: 
-'
+%22
 css-load
@@ -946,17 +946,17 @@
 s-loader
-'
+%22
 %0A       
@@ -1062,17 +1062,17 @@
 loader: 
-'
+%22
 file-loa
@@ -1074,17 +1074,17 @@
 e-loader
-'
+%22
 ,%0A      
@@ -1109,17 +1109,17 @@
  %7Bname: 
-'
+%22
 %5Bname%5D.%5B
@@ -1129,17 +1129,17 @@
 h%5D.%5Bext%5D
-'
+%22
 %7D,%0A     
@@ -1241,17 +1241,17 @@
 irname, 
-'
+%22
 node_mod
@@ -1262,17 +1262,17 @@
 /pixi.js
-'
+%22
 ),%0A     
@@ -1352,17 +1352,17 @@
 mplate: 
-'
+%22
 src/inde
@@ -1371,17 +1371,17 @@
 html.ejs
-'
+%22
 %0A       
@@ -1415,17 +1415,17 @@
 tPlugin(
-'
+%22
 %5Bname%5D.%5B
@@ -1440,17 +1440,17 @@
 ash%5D.css
-'
+%22
 ),%0A     
@@ -1518,27 +1518,27 @@
 s: %5B
-'
+%22
 vendor
-', '
+%22, %22
 manifest
 '%5D%0A 
@@ -1533,17 +1533,17 @@
 manifest
-'
+%22
 %5D%0A      
@@ -1595,17 +1595,17 @@
  %7Bfrom: 
-'
+%22
 src/stat
@@ -1610,23 +1610,23 @@
 atic
-'
+%22
 , to: 
-'
+%22
 static
-'
+%22
 %7D%0A  

Fix eslint issues in webpack.config.js