webpack-contrib / purifycss-webpack

UNMAINTAINED, use https://github.com/FullHuman/purgecss-webpack-plugin
MIT License
772 stars 37 forks source link

uglifyjs depreciation breaks build #108

Closed newtriks closed 7 years ago

newtriks commented 7 years ago

Based on this libs dependency on purifycss, uglifyjs depreciation breaks build. See:

  1. https://github.com/purifycss/purifycss/issues/159
  2. https://github.com/mishoo/UglifyJS2/issues/936#issuecomment-301620396
bebraw commented 7 years ago

There's not much I can do about that in this plugin. Maybe better wait until Purify gets fixed.

newtriks commented 7 years ago

@bebraw yup, agreed. I wanted to ensure it was reported and visible to others digging through dependencies of dependencies trying to work out the path to the original error 😃

kasperlewau commented 7 years ago

https://www.npmjs.com/package/purify-css

Purify has been fixed & bumped to 1.2.1

bebraw commented 7 years ago

@newtriks Can you close this issue once you check against the new version?

newtriks commented 7 years ago

@bebraw yup 👍

rafaeleyng commented 7 years ago

I'm having the same issue, what is the recommended solution?

bebraw commented 7 years ago

@rafaeleyng Which version of Purify are you using? I cannot fix the issue here but they published a fixed version.

rafaeleyng commented 7 years ago

I'm using:

  └─┬ purifycss-webpack-plugin@2.0.3
    └─┬ purify-css@1.1.9
      └── uglifyjs@2.4.11 

I understand that they published a fixed version, but I'm not sure how to use that since my dependency of purify-css is through purifycss-webpack

alexander-akait commented 7 years ago

@rafaeleyng try to use npm cache clear and reinstall node_modules

bebraw commented 7 years ago

@rafaeleyng Ok, I think I'll push Purify as a peer dependency so you can specify the exact version.

bebraw commented 7 years ago

Just pushed it to peer dependency. @evilebottnawi's advice is valid too but it's better to manage this through a peer.

rafaeleyng commented 7 years ago

@bebraw Are you going to make a npm release? I'm not sure what should I do

bebraw commented 7 years ago

@rafaeleyng Already done. Does it still fail for you?

rafaeleyng commented 7 years ago

@bebraw I'm really confused now.

As shown in my comment above, I'm using purifycss-webpack-plugin@2.0.3. I just checked https://www.npmjs.com/package/purifycss-webpack-plugin and the latest release there is 2.0.3. The link to the git repo in that page refers to this repo, but here the latest version (that was generated 2 hours ago) is 0.8.0. It seems to be 2 unrelated libraries, but the npm package links to this git repo. So I'm still clueless about what to do.

By the way, thank you for all the patience.

rafaeleyng commented 7 years ago

I just saw that this package also exists https://www.npmjs.com/package/purifycss-webpack, that seems to be the correct. Trying this one instead.

bebraw commented 7 years ago

@rafaeleyng purifycss-webpack-plugin is something separate (deprecated). I had to rename a plugin to continue its development (the original author disappeared and npm took four weeks to transfer, I needed the plugin sooner than that).

rafaeleyng commented 7 years ago

@bebraw It seems to work now. I'm having configuration problems now, but the installation seems to be working fine. Thanks!

bebraw commented 7 years ago

@rafaeleyng The configuration is very different, yeah.

Time to close this.