From fc604679b95387f8f93d9427f89737f691958aba Mon Sep 17 00:00:00 2001 From: Leandro Roberto Date: Sun, 13 Jan 2019 01:07:48 -0200 Subject: [PATCH] =?UTF-8?q?add=20vue.config.js=20e=20configura=20comunica?= =?UTF-8?q?=C3=A7=C3=A3o=20com=20webpack-loader?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sapl-frontend/package.json | 3 ++- sapl-frontend/vue.config.js | 30 ++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 sapl-frontend/vue.config.js diff --git a/sapl-frontend/package.json b/sapl-frontend/package.json index 11dd00860..617aa9735 100644 --- a/sapl-frontend/package.json +++ b/sapl-frontend/package.json @@ -10,7 +10,8 @@ "dependencies": { "vue": "^2.5.21", "vue-router": "^3.0.1", - "vuex": "^3.0.1" + "vuex": "^3.0.1", + "webpack-bundle-tracker": "^0.4.2-beta" }, "devDependencies": { "@vue/cli-plugin-babel": "^3.3.0", diff --git a/sapl-frontend/vue.config.js b/sapl-frontend/vue.config.js new file mode 100644 index 000000000..4462732be --- /dev/null +++ b/sapl-frontend/vue.config.js @@ -0,0 +1,30 @@ +const BundleTracker = require('webpack-bundle-tracker') + +module.exports = { + publicPath: 'http://localhost:8080/', + outputDir: './dist/', + + + chainWebpack: config => { + + config.optimization + .splitChunks(false) + + config + .plugin('BundleTracker') + .use(BundleTracker, [{ filename: './webpack-stats.json' }]) + + config.resolve.alias + .set('__STATIC__', 'static') + + config.devServer + .public('') + .host('localhost') + .port(8080) + .hotOnly(true) + .watchOptions({ poll: 1000 }) + .https(false) + .headers({ 'Access-Control-Allow-Origin': '\*' }) + + } +}