mirror of
https://github.com/kevin-DL/InertiaJS-Vue3-Tailwind-CSS-AdonisJS.git
synced 2026-01-11 02:44:26 +00:00
36 lines
1.1 KiB
JavaScript
36 lines
1.1 KiB
JavaScript
const mix = require('laravel-mix');
|
|
const path = require('path');
|
|
const tailwindcss = require('tailwindcss');
|
|
const autoprefixer = require('autoprefixer');
|
|
const purgecss = require('@fullhuman/postcss-purgecss');
|
|
|
|
mix.js('resources/js/app.js', 'public/js/app.js').vue({
|
|
version: 3,
|
|
extractStyles: true,
|
|
globalStyles: false
|
|
})
|
|
.postCss('resources/css/app.css', 'public/css/app.css')
|
|
.options({
|
|
postCss: [
|
|
autoprefixer(),
|
|
tailwindcss('tailwind.config.js'),
|
|
...mix.inProduction() ? [
|
|
purgecss({
|
|
content: ['./resources/views/**/*.edge', './resources/js/**/*.vue'],
|
|
defaultExtractor: content => content.match(/[\w-/:.]+(?<!:)/g) || [],
|
|
whitelistPatternsChildren: [/nprogress/],
|
|
})
|
|
] : [],
|
|
],
|
|
}).
|
|
webpackConfig({
|
|
output: { chunkFilename: 'js/[name].js?id=[chunkhash]' },
|
|
resolve: {
|
|
alias: {
|
|
'@': path.resolve('resources/js')
|
|
}
|
|
}
|
|
})
|
|
//.version()
|
|
.sourceMaps()
|