summaryrefslogtreecommitdiffstats
path: root/apps/updatenotification/js-src/webpack.config.js
diff options
context:
space:
mode:
Diffstat (limited to 'apps/updatenotification/js-src/webpack.config.js')
-rw-r--r--apps/updatenotification/js-src/webpack.config.js55
1 files changed, 55 insertions, 0 deletions
diff --git a/apps/updatenotification/js-src/webpack.config.js b/apps/updatenotification/js-src/webpack.config.js
new file mode 100644
index 00000000000..30bdd5efb5c
--- /dev/null
+++ b/apps/updatenotification/js-src/webpack.config.js
@@ -0,0 +1,55 @@
+var path = require('path');
+var webpack = require('webpack');
+
+module.exports = {
+ entry: './js-src/init.js',
+ output: {
+ path: path.resolve(__dirname, '../js'),
+ publicPath: '/',
+ filename: 'merged.js'
+ },
+ module: {
+ rules: [
+ {
+ test: /\.vue$/,
+ loader: 'vue-loader',
+ options: {
+ loaders: {
+ },
+ esModule: false
+ // other vue-loader options go here
+ }
+ }
+ ]
+ },
+ resolve: {
+ alias: {
+ 'vue': process.env.NODE_ENV === 'production' ? 'vue/dist/vue.min.js' : 'vue/dist/vue.js'
+ }
+ },
+ performance: {
+ hints: false
+ },
+ devtool: '#eval-source-map'
+};
+
+if (process.env.NODE_ENV === 'production') {
+ module.exports.devtool = '#source-map';
+ // http://vue-loader.vuejs.org/en/workflow/production.html
+ module.exports.plugins = (module.exports.plugins || []).concat([
+ new webpack.DefinePlugin({
+ 'process.env': {
+ NODE_ENV: '"production"'
+ }
+ }),
+ new webpack.optimize.UglifyJsPlugin({
+ sourceMap: true,
+ compress: {
+ warnings: false
+ }
+ }),
+ new webpack.LoaderOptionsPlugin({
+ minimize: true
+ })
+ ]);
+}