-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.mix.js
56 lines (50 loc) · 1.27 KB
/
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
let mix = require('laravel-mix');
let tailwindcss = require('tailwindcss');
// require('laravel-mix-tailwind');
/*
|--------------------------------------------------------------------------
| Mix Asset Management
|--------------------------------------------------------------------------
|
| Mix provides a clean, fluent API for defining some Webpack build steps
| for your Laravel application. By default, we are compiling the Sass
| file for your application, as well as bundling up your JS files.
|
*/
class TailwindExtractor {
static extract(content) {
return content.match(/[A-Za-z0-9-_:\/]+/g) || [];
}
}
// admin
// mix.js('resources/script/admin/limit-excerpt.js', 'assets/js/admin/');
// home
// mix.js('resources/script/home/home.js','assets/js/home/')
// .stylus('resources/stylus/home/home.styl', 'assets/css/home/')
// .options({
// postCss: [
// tailwindcss('./tailwind/home.js'),
// ]
// })
// single - default 01
mix
.stylus(
'assets/styl/style.styl',
'assets/css/style.css'
)
.options({
postCss: [
tailwindcss('tailwind.js'),
]
})
.webpackConfig({
module: {
rules : [
{
test: /\.pug$/,
loader: 'pug-plain-loader'
}
]
}
})
.disableNotifications()