From faf3dcca602da9f2287e8be9acaa1023144b23d7 Mon Sep 17 00:00:00 2001 From: Jakob Warkotsch Date: Thu, 20 Dec 2018 12:17:49 +0100 Subject: [PATCH] Allow subdirectories in /assets Also explains what's going on, formats per (ts) rules. --- vue.config.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/vue.config.js b/vue.config.js index 39c5dbb..079a96e 100644 --- a/vue.config.js +++ b/vue.config.js @@ -4,8 +4,6 @@ const TARGET_NODE = process.env.WEBPACK_TARGET === 'node'; const DEV_MODE = process.env.WEBPACK_TARGET === 'dev'; const filePrefix = 'wikibase.termbox.'; -const assetsPath = './assets'; - const target = TARGET_NODE ? 'server' : 'client'; @@ -42,14 +40,15 @@ module.exports = { ...args, ] ); + // ResourceLoader has access to /assets/* and /dist/*.css - use assets directly config.module - .rule('images') + .rule( 'images' ) .test( /\.(png|jpe?g|gif|svg)(\?.*)?$/ ) .use( 'url-loader' ) .loader( 'url-loader' ) .options( { limit: -1, - name: assetsPath + '/[name].[ext]', + name: '[path]/[name].[ext]', } ); }