diff --git a/package.json b/package.json index 939b6f073..96ef0ea6f 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,7 @@ "@vue/cli-service": "^4.3.1", "babel-eslint": "^10.1.0", "compression-webpack-plugin": "^3.1.0", + "copy-webpack-plugin": "^6.3.0", "css-loader": "^3.5.2", "eslint": "^6.8.0", "eslint-config-standard": "^14.1.1", diff --git a/vue.config.js b/vue.config.js index cfe9bbe68..7a139a2ce 100644 --- a/vue.config.js +++ b/vue.config.js @@ -4,6 +4,7 @@ const each = require('lodash/fp/each') const MomentLocalesPlugin = require('moment-locales-webpack-plugin') const BundleTrackerPlugin = require('webpack-bundle-tracker') const CompressionPlugin = require('compression-webpack-plugin') +const CopyPlugin = require('copy-webpack-plugin') class RelativeBundleTrackerPlugin extends BundleTrackerPlugin { convertPathChunks (chunks) { @@ -19,7 +20,6 @@ class RelativeBundleTrackerPlugin extends BundleTrackerPlugin { super.writeOutput(compiler, contents) } } -// module.exports = RelativeBundleTrackerPlugin const dotenv = require('dotenv') dotenv.config({ @@ -40,6 +40,20 @@ module.exports = { config.plugins.delete('preload') config.plugins.delete('prefetch') + config.resolve + .alias.set('@', path.join(__dirname + "/frontend/", 'src')) + + config + .plugin('CopyPlugin') + .use(CopyPlugin, [{ + patterns: [ + { + from: path.join(__dirname + "/frontend/", 'public'), + to: '.' + }, + ], + }]) + config .plugin('RelativeBundleTrackerPlugin') .use(RelativeBundleTrackerPlugin, [{