Skip to content

Instantly share code, notes, and snippets.

@devoltt
Created July 6, 2020 17:11
Show Gist options
  • Save devoltt/39339c5c02d7cb5039d6c2b714c4285a to your computer and use it in GitHub Desktop.
Save devoltt/39339c5c02d7cb5039d6c2b714c4285a to your computer and use it in GitHub Desktop.
Laravel Nova webpack.mix.js.dist
let mix = require('laravel-mix')
let tailwindcss = require('tailwindcss')
/*
|--------------------------------------------------------------------------
| 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.
|
*/
mix
.js('resources/js/app.js', 'public')
.extract([
'axios',
'chartist-plugin-tooltips',
'chartist',
'codemirror',
'flatpickr',
'form-backend-validation',
'inflector-js',
'laravel-nova',
'lodash',
'markdown-it',
'marked',
'moment-timezone',
'moment',
'numbro',
'places.js',
'popper.js',
'portal-vue',
'trix',
'vue-async-computed',
'vue-clickaway',
'vue-router',
'vue-toasted',
'vue',
])
.setPublicPath('public')
.postCss('resources/css/app.css', 'public', [tailwindcss('tailwind.js')])
.copy('public', '../nova-app/public/vendor/nova')
.webpackConfig({
resolve: {
alias: {
'@': path.resolve(__dirname, 'resources/js/'),
},
},
})
.version()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment