Skip to content

Commit

Permalink
feat: load plugin images properly
Browse files Browse the repository at this point in the history
to not output images in plugins to the root directory but to the
static/img folder, the rule for loading assets was adjusted to
exclude the plugins folder.
A separate rule was created to the be used for the plugin folder
only.
  • Loading branch information
TheGreatRefrigerator committed Feb 15, 2023
1 parent 75ed0ea commit bcaba6a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion build/webpack.base.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,15 @@ module.exports = {
}
},{
test: /\.(woff|woff2|eot|ttf|otf|png|svg|jpg|jpeg|gif|ico)$/i,
type: 'asset'
type: 'asset',
exclude: resolveRoot('src/plugins')
},{
test: /\.(woff|woff2|eot|ttf|otf|png|svg|jpg|jpeg|gif|ico)$/i,
type: 'asset',
include: resolveRoot('src/plugins'),
generator: {
filename: 'static/img/[name][ext]'
}
},{
test: /\.(geojson|kml|gpx|txt)$/i,
type: 'asset/source',
Expand Down

0 comments on commit bcaba6a

Please sign in to comment.