From df358601fb44a79d761c4032784b4764ea0b34de Mon Sep 17 00:00:00 2001 From: NADAL Jean-Baptiste Date: Sat, 26 Mar 2016 16:40:45 +0100 Subject: [PATCH] Commit a working vuejs skeleton. --- src/ui/Domo/webpack.config.js | 66 +++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 src/ui/Domo/webpack.config.js 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() + ]) +}