Skip to content
This repository has been archived by the owner on Mar 1, 2019. It is now read-only.

Commit

Permalink
Allow subdirectories in /assets
Browse files Browse the repository at this point in the history
Also explains what's going on, formats per (ts) rules.
  • Loading branch information
jakobw authored and wiese committed Dec 20, 2018
1 parent 32a3057 commit faf3dcc
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions vue.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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]',
} );
}

Expand Down

0 comments on commit faf3dcc

Please sign in to comment.