added comment to tailwind docs for purgecss extractor and added ignoring of .DS_Store with the new CopyWebpackPlugin configuration options
This commit is contained in:
parent
8dcfab79cb
commit
da609ee129
1 changed files with 7 additions and 0 deletions
|
@ -35,6 +35,8 @@ if ( isProduction ) {
|
||||||
css: [
|
css: [
|
||||||
'./node_modules/tailwindcss/dist/base.css'
|
'./node_modules/tailwindcss/dist/base.css'
|
||||||
],
|
],
|
||||||
|
// Use Extractor configuration from Tailwind Docs
|
||||||
|
// https://tailwindcss.com/docs/controlling-file-size#setting-up-purge-css-manually
|
||||||
defaultExtractor: content => {
|
defaultExtractor: content => {
|
||||||
// Capture as liberally as possible, including things like `h-(screen-1.5)`
|
// Capture as liberally as possible, including things like `h-(screen-1.5)`
|
||||||
const broadMatches = content.match(/[^<>"'`\s]*[^<>"'`\s:]/g) || []
|
const broadMatches = content.match(/[^<>"'`\s]*[^<>"'`\s:]/g) || []
|
||||||
|
@ -115,6 +117,11 @@ const config = {
|
||||||
patterns: [{
|
patterns: [{
|
||||||
from: './assets/images/',
|
from: './assets/images/',
|
||||||
to: 'images',
|
to: 'images',
|
||||||
|
globOptions: {
|
||||||
|
ignore: [
|
||||||
|
'**/.DS_Store'
|
||||||
|
]
|
||||||
|
}
|
||||||
}]
|
}]
|
||||||
}),
|
}),
|
||||||
new ImageminPlugin({ test: /\.(jpe?g|png|gif|svg)$/i })
|
new ImageminPlugin({ test: /\.(jpe?g|png|gif|svg)$/i })
|
||||||
|
|
Loading…
Reference in a new issue