Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Laravel Mix 6 Support #89

Closed
HDVinnie opened this issue Oct 7, 2020 · 7 comments
Closed

Laravel Mix 6 Support #89

HDVinnie opened this issue Oct 7, 2020 · 7 comments

Comments

@HDVinnie
Copy link

HDVinnie commented Oct 7, 2020

See laravel-mix/laravel-mix#2527 (comment)

@sebastiandedeyne
Copy link
Member

Working on this!

I just pushed a next branch with the progress. Laravel Mix updated to Postcss 8, but the Purgecss plugin doesn't support 8 yet (FullHuman/purgecss#488). I think we'll be able to tag a new version when that's done.

@sebastiandedeyne
Copy link
Member

Continuing this in #90.

@kingroho
Copy link

kingroho commented Nov 7, 2020

I still get TypeError: Cannot read property 'postCss' of undefined. I'm using laravel-mix 6.0.0-beta.11. Tried installing postcss and postcss-loader too. Still getting the same error.

@sebastiandedeyne
Copy link
Member

Could you share:

  • The contents of webpack.mix.js
  • The output of npm list/yarn list

@mwargan
Copy link

mwargan commented Dec 8, 2020

+1 with this issue on 6.

npm list outputs

├── @babel/plugin-syntax-dynamic-import@7.8.3
├── @babel/preset-env@7.12.7
├── aos@3.0.0-beta.6
├── axios@0.19.2
├── bootstrap@4.5.3
├── browser-sync-webpack-plugin@2.2.2
├── browser-sync@2.26.13
├── chart.js@2.9.4
├── cross-env@5.2.1
├── jquery@3.5.1
├── laravel-echo@1.9.0
├── laravel-mix-bundle-analyzer@1.0.5
├── laravel-mix-purgecss@5.0.0
├── laravel-mix-workbox@0.1.2
├── laravel-mix@6.0.0-beta.15
├── leaflet-geosearch@2.7.0
├── leaflet@1.7.1
├── moment@2.29.1
├── popper.js@1.16.1
├── postcss-loader@4.1.0
├── postcss@8.2.0
├── purify-css@1.2.5
├── purifycss-webpack@0.7.0
├── pusher-js@5.1.1
├── resolve-url-loader@2.3.2
├── sass-loader@7.3.1
├── sass@1.30.0
├── vue-chartjs@3.5.1
├── vue-google-autocomplete@1.1.0
├── vue-loader@15.9.5
├── vue-stripe-elements-plus@0.3.2
├── vue-template-compiler@2.6.12
├── vue-textarea-autosize@1.1.1
├── vue@2.6.12
├── vue2-leaflet-geosearch@1.0.6
├── vue2-leaflet-locatecontrol@1.0.1
├── vue2-leaflet-markercluster@3.1.0
├── vue2-leaflet@2.6.0
└── workbox-webpack-plugin@6.0.2

webpack.mix.js looks like

const mix = require('laravel-mix');

require('laravel-mix-purgecss');
require('laravel-mix-bundle-analyzer');

mix
.sourceMaps()
.js('resources/js/app.js', 'public/js')
.vue()
.extract([ 'vue', 'jquery', 'bootstrap', 'moment', 'pusher-js']);

mix.sass('resources/sass/app.scss', 'public/css')
.styles([
        'resources/sass/app.css',
    'resources/sass/normalize.css',
    'resources/sass/skeleton.css',
], 'public/css/all.css')
.purgeCss({
       enabled: true,
   });

@sebastiandedeyne
Copy link
Member

I just tagged a beta version of laravel-mix-purgecss for testing.

Use version 6.0.0-beta.0 if you're using Laravel Mix 6, that should do the trick.

@sebastiandedeyne
Copy link
Member

Shipped! 🚢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants