pingcrm/webpack.mix.js

42 lines
1.1 KiB
JavaScript
Raw Normal View History

2019-03-18 08:53:00 -03:00
const cssImport = require('postcss-import')
const cssNesting = require('postcss-nesting')
const mix = require('laravel-mix')
const path = require('path')
const tailwindcss = require('tailwindcss')
2019-03-05 18:10:11 -03:00
/*
|--------------------------------------------------------------------------
| 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 the application as well as bundling up all the JS files.
|
*/
// Provide inline source maps.
if ( ! mix.inProduction()) {
mix.webpackConfig({
devtool: 'inline-source-map',
})
.sourceMaps()
}
2019-03-05 18:10:11 -03:00
mix.js('resources/js/app.js', 'public/js')
2019-03-18 08:53:00 -03:00
.postCss('resources/css/app.css', 'public/css', [
cssImport(),
cssNesting(),
tailwindcss('tailwind.js'),
])
.webpackConfig({
output: { chunkFilename: 'js/[name].[contenthash].js' },
resolve: {
alias: {
'vue$': 'vue/dist/vue.runtime.js',
'@': path.resolve('resources/js'),
},
},
})
.version()