var webpack = require('webpack'); module.exports = { context: __dirname + "/app", entry: "./main.js", output: { path: __dirname + "/dist", publicPath: '/dist/', filename: "bundle.js" }, module: { loaders: [ {test: /\.js$/, loader: 'babel-loader', query: {presets: ['es2015']}}, {test: /\.css$/, loader: 'style-loader!css-loader'}, {test: /\.(png|jpg)$/, loader: 'url-loader?limit=8192'}, {test: /\.vue$/, loader: 'vue'}, {test: /\.woff(\?v=\d+\.\d+\.\d+)?$/, loader: "url?limit=10000&mimetype=application/font-woff"}, {test: /\.woff2(\?v=\d+\.\d+\.\d+)?$/, loader: "url?limit=10000&mimetype=application/font-woff"}, {test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, loader: "url?limit=10000&mimetype=application/octet-stream"}, {test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, loader: "file"}, {test: /\.svg(\?v=\d+\.\d+\.\d+)?$/, loader: "url?limit=10000&mimetype=image/svg+xml"} ] }, plugins: [ new webpack.ProvidePlugin({ $: "jquery", jQuery: "jquery", "window.jQuery": "jquery" }) ] }; if (process.env.NODE_ENV === 'production') { module.exports.plugins = [ new webpack.DefinePlugin({'process.env': {NODE_ENV: '"production"'}}), new webpack.optimize.UglifyJsPlugin({compress: {warnings: false}, comments: false}), new webpack.optimize.OccurenceOrderPlugin(), new webpack.optimize.DedupePlugin() ] }