Skip to content

Commit acb15a2

Browse files
document PurgeCSS config, comment out as optional
1 parent d9203a7 commit acb15a2

File tree

1 file changed

+28
-26
lines changed

1 file changed

+28
-26
lines changed

src/tailwindcss-stubs/webpack.mix.js

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -40,30 +40,32 @@ mix.js('resources/assets/js/app.js', 'public/js')
4040
// postCss: [ tailwindcss('tailwind.js') ],
4141
// });
4242

43-
// Only run PurgeCSS during production builds for faster development builds
44-
// and so you still have the full set of utilities available during
45-
// development.
46-
if (mix.inProduction()) {
47-
mix.webpackConfig({
48-
plugins: [
49-
new PurgecssPlugin({
50-
51-
// Specify the locations of any files you want to scan for class names.
52-
paths: glob.sync([
53-
path.join(__dirname, "resources/views/**/*.blade.php"),
54-
path.join(__dirname, "resources/assets/js/**/*.vue")
55-
]),
56-
extractors: [
57-
{
58-
extractor: TailwindExtractor,
59-
60-
// Specify the file extensions to include when scanning for
61-
// class names.
62-
extensions: ["html", "js", "php", "vue"]
63-
}
64-
]
65-
})
66-
]
67-
});
68-
}
43+
// PurgeCSS is a utility that parses your application view files, identifies which
44+
// utility classes are actually being used, removing unused classes. This means
45+
// your final CSS will be much smaller, containing just the styles you need.
46+
//
47+
// Only run PurgeCSS in production builds keeping your development builds fast,
48+
// whilst still leaving you with a full set of utilities during development.
49+
// if (mix.inProduction()) {
50+
// mix.webpackConfig({
51+
// plugins: [
52+
// new PurgecssPlugin({
53+
//
54+
// // Specify the locations of any files you want to scan for class names.
55+
// paths: glob.sync([
56+
// path.join(__dirname, "resources/views/**/*.blade.php"),
57+
// path.join(__dirname, "resources/assets/js/**/*.vue")
58+
// ]),
59+
// extractors: [
60+
// {
61+
// extractor: TailwindExtractor,
62+
//
63+
// // Specify the file extensions to include when scanning for class names.
64+
// extensions: ["html", "js", "php", "vue"]
65+
// }
66+
// ]
67+
// })
68+
// ]
69+
// });
70+
// }
6971

0 commit comments

Comments
 (0)