Closed martincarlin87 closed 6 years ago
Since you've updated Mix, could you update the scripts
tag in package.json
too? It seems that others have had similar issues with Mix, and it was mostly related to that (e.g. https://github.com/JeffreyWay/laravel-mix/issues/373#issuecomment-284179800)
Here's what the latest version looks like: https://github.com/laravel/laravel/blob/f4cba4f2b254456645036139129142df274a1ec1/package.json#L3
Here's another similar issue that might give you a clue... https://github.com/JeffreyWay/laravel-mix/issues/127
Thanks Sebastian, all good, just seems to cause an error when specifying the extensions.
.purgeCss({
enabled: true,
// extensions: ['html', 'js', 'php']
});
is fine but once uncommented it produces the same error
TypeError: Cannot read property 'extractor' of undefined
which seems to come from purgecss itself?`
I could be misusing the package, is a custom extractor required if extensions is specified in the config? If so, I will just leave it out, I was just trying to reduce the number of extensions as I don't have any .html
or .vue
files.
Cheers, Martin
Looks like that was a bug on our end! I just released 1.0.2
, could you give that a spin?
Yip, thank you, it works now :)
Hi there,
I can't seem to get this to work unfortunately, but it could very well be a wider issue and not down to this particular package.
OS: OS X 10.12.6 Sierra Laravel: 5.4 Node: 7.8.0 npm: 4.2.0
My
webpack.mix.js
file hasn't been touched for a while with the exception of adding new js files to compile:I've changed it to the following, but even commenting out the package specific lines and only requiring the node module seems to cause the
npm run dev
command to fail:I've also tried completely removing the existing
node_modules
directory and clearing the cache:The only thing I changed in my
package.json
was to change thelaravel-mix
version to^2.0.0
, it was previously0.*
.The error message isn't very helpful, this is the entire log file generated:
Currently attempting upgrading my versions of node and npm to see if that helps.
Update
After updating, the commented out version works which just requires the package and doesn't try to use it, after trying to use the plugin, it generates this error:
If I remove the extensions line in the config then it seems to work:
Thanks, Martin