Skip to content

Not working with extract-text plugin #4

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

Closed
hworld opened this issue Apr 4, 2017 · 4 comments
Closed

Not working with extract-text plugin #4

hworld opened this issue Apr 4, 2017 · 4 comments

Comments

@hworld
Copy link

hworld commented Apr 4, 2017

In webpack 2.

Child extract-text-webpack-plugin:

    ERROR in ./~/css-loader?-minimize!./~/clean-css-loader!./~/postcss-loader!./~/vue-template-loader/lib/scoped-style-loader.js?id=data-v-13!./~/stylus-relative-loader?paths[]=src/&resolve url&include css!./src/app/components/shell/top-nav/top-nav.s
tyl
    Module build failed: TypeError: Cannot read property 'cleancss' of undefined
        at Object.module.exports (.../node_modules/clean-css-loader/index.js:7:25)

All I'm doing is including it in the "use" option that includes the loaders. I tried it with and without options.

@retyui
Copy link
Owner

retyui commented Apr 4, 2017

@hworld Could you provide a test case with an error?)

@hworld
Copy link
Author

hworld commented Apr 4, 2017

@retyui not sure if this will work for you, but you can try https://github.com/gamejolt/sites-io/tree/clean-css-loader
I put the changes for my repo into a branch. You'll have to:

  • clone it
  • git submodule init
  • git submodule update
  • npm i
  • npm run build

The relevant webpack building code is here: https://github.com/gamejolt/frontend-lib/blob/f3bb056a81ce0b0992e5778a813eba017518198b/gulp/tasks/webpack.js

@retyui
Copy link
Owner

retyui commented Apr 4, 2017

@hworld Please check, npm i -D clean-css-loader@0.0.5

@hworld
Copy link
Author

hworld commented Apr 4, 2017

Aha! Seems to be working now! Thanks for the fix. I didn't expect it to be so fast. =]

@retyui retyui closed this as completed Apr 5, 2017
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

2 participants