-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.mix.js
34 lines (32 loc) · 884 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
27
28
29
30
31
32
33
34
let mix = require('laravel-mix');
let build = require('./tasks/build.js');
let tailwindcss = require('tailwindcss');
require('laravel-mix-purgecss');
mix.disableSuccessNotifications();
mix.setPublicPath('source/assets/build/');
mix.webpackConfig({
plugins: [
build.jigsaw,
build.browserSync(),
build.watch([
'config.php',
'source/**/*.md',
'source/**/*.php',
'source/**/*.scss',
]),
],
});
mix.js('source/_assets/js/main.js', 'js')
.sourceMaps()
.sass('source/_assets/sass/main.scss', 'css/main.css')
.sourceMaps()
.options({
processCssUrls: false,
postCss: [tailwindcss()],
})
.purgeCss({
extensions: ['html', 'md', 'js', 'php', 'vue'],
folders: ['source'],
whitelistPatterns: [/language/, /hljs/, /mce/],
})
.version();