Skip to content

Commit

Permalink
Merge pull request #28 from e-sites/feature/cleaner-webpack-config
Browse files Browse the repository at this point in the history
cleaner copyPlugin in webpack config
  • Loading branch information
tomschalken authored Feb 1, 2021
2 parents 95f0699 + 4d261d8 commit 2c47f53
Showing 1 changed file with 9 additions and 17 deletions.
26 changes: 9 additions & 17 deletions app/templates/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,23 +115,15 @@ module.exports = {
}),

// copy the rest of the unprocessed files
new CopyPlugin([
// Loose svg's
{
from: `${paths.source + paths.folders.svg}`,
to: paths.folders.svg.replace('/', ''),
},
// Loose images
{
from: `${paths.source + paths.folders.images}`,
to: paths.folders.images.replace('/', ''),
},
// fonts
{
from: `${paths.source + paths.folders.fonts}`,
to: paths.folders.fonts.replace('/', ''),
},
]),
new CopyPlugin(
['svg', 'images', 'fonts']
.map(entry => (
{
from: `${paths.source + paths.folders[entry]}`,
to: paths.folders[entry].replace('/', ''),
}
))
),

new WebpackNotifierPlugin({
title: 'Webpack',
Expand Down

0 comments on commit 2c47f53

Please sign in to comment.