generated from alpas/starter
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwebpack.mix.js
26 lines (25 loc) · 936 Bytes
/
webpack.mix.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
let mix = require('laravel-mix')
const cssImport = require('postcss-import')
const cssNesting = require('postcss-nesting')
const tailwindcss = require('tailwindcss')
const purgecss = require('@fullhuman/postcss-purgecss')
const resourcesPath = 'src/main/resources'
const publicPath = `${resourcesPath}/web`
const templatesPath = `${resourcesPath}/templates`
mix
.setPublicPath(publicPath)
.less(`${resourcesPath}/css/app.less`, 'css')
.options({
postCss: [
cssImport(),
cssNesting(),
tailwindcss('./tailwind.config.js'),
...mix.inProduction() ? [
purgecss({
content: [`${templatesPath}/**/*.peb`],
defaultExtractor: content => content.match(/[\w-/:.]+(?<!:)/g) || [],
whitelistPatternsChildren: [/nprogress/],
}),
] : [],
],
}).disableNotifications()