A collection of games I worked on in high school.
at main 47 lines 986 B view raw
1var webpack = require("webpack"); 2 3module.exports = { 4 entry: "./public/src/main.js", 5 output: { 6 path: "./public/dist/js", 7 publicPath: "/dist/js/", 8 filename: "build.js" 9 }, 10 module: { 11 // avoid webpack trying to shim process 12 noParse: /es6-promise\.js$/, 13 loaders: [ 14 { 15 test: /\.vue$/, 16 loader: "vue" 17 }, 18 { 19 test: /\.js$/, 20 // excluding some local linked packages. 21 // for normal use cases only node_modules is needed. 22 exclude: /node_modules|vue\/dist|vue-router\/|vue-loader\/|vue-hot-reload-api\//, 23 loader: "babel" 24 } 25 ] 26 }, 27 babel: { 28 presets: ["es2015"], 29 plugins: ["transform-runtime"] 30 } 31}; 32 33if (process.env.NODE_ENV === "production") { 34 module.exports.plugins = [ 35 new webpack.DefinePlugin({ 36 "process.env": { 37 NODE_ENV: "production" 38 } 39 }), 40 new webpack.optimize.UglifyJsPlugin({ 41 compress: { 42 warnings: false 43 } 44 }), 45 new webpack.optimize.OccurenceOrderPlugin() 46 ]; 47} else module.exports.devtool = "#source-map";