diff --git a/src/ui/Domo/webpack.config.js b/src/ui/Domo/webpack.config.js new file mode 100644 index 00000000..40681869 --- /dev/null +++ b/src/ui/Domo/webpack.config.js @@ -0,0 +1,66 @@ +var path = require('path') +var webpack = require('webpack') + +module.exports = { + entry: './src/main.js', + output: { + path: path.resolve(__dirname, './dist'), + publicPath: '/dist/', + filename: 'build.js' + }, + resolveLoader: { + root: path.join(__dirname, 'node_modules'), + }, + module: { + loaders: [ + { + test: /\.vue$/, + loader: 'vue' + }, + { + test: /\.js$/, + loader: 'babel', + exclude: /node_modules/ + }, + { + test: /\.json$/, + loader: 'json' + }, + { + test: /\.html$/, + loader: 'vue-html' + }, + { + test: /\.(png|jpg|gif|svg)$/, + loader: 'url', + query: { + limit: 10000, + name: '[name].[ext]?[hash]' + } + } + ] + }, + devServer: { + historyApiFallback: true, + noInfo: true + }, + devtool: 'eval-source-map' +} + +if (process.env.NODE_ENV === 'production') { + module.exports.devtool = 'source-map' + // http://vuejs.github.io/vue-loader/workflow/production.html + module.exports.plugins = (module.exports.plugins || []).concat([ + new webpack.DefinePlugin({ + 'process.env': { + NODE_ENV: '"production"' + } + }), + new webpack.optimize.UglifyJsPlugin({ + compress: { + warnings: false + } + }), + new webpack.optimize.OccurenceOrderPlugin() + ]) +}