Answers for "laravel mix extract"

PHP
2

laravel mix purge css

npm install laravel-mix-purgecss --save-dev
  
const mix = require('laravel-mix');
require('laravel-mix-purgecss');

// ...

mix.js('resources/js/app.js', 'public/js')
   .sass('resources/sass/app.scss', 'public/css')
   .purgeCss(); //Add this line and that'll do the job
Posted by: Guest on September-17-2020
0

laravel mix build as umd

mix.js('src/main.js', 'dist/libraryName.js')

mix.webpackConfig({
  output: {
    library: 'libraryName',
    libraryTarget: 'umd',
    umdNamedDefine: true
  }
})
Posted by: Guest on September-16-2020

Browse Popular Code Answers by Language