Skip to content

Conversation

@treyhuffine
Copy link

The parameters for ExtractTextPlugin should be an object. It's invalid in it's current form.

The parameters for ExtractTextPlugin should be an object. It's invalid in it's current form.
The word "loaders" is not accepted as valid
test: /\.less$/,
use: ExtractTextPlugin.extract({
fallbackLoader: 'style-loader',
loaders: [

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Man, this is acceptable!!! This example is loading the webpack loader with 'rules` of webpack 2. All this examples on README are about webpack 2. Take a time for read little more about webpack 2 features.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Take time to read my code, the Webpack 2 docs and run the changes yourself before making comments like. I'm using Webpack ^2.2.0, and the "valid" syntax you're claiming is not valid on the docs.

rules: [
{
test: /\.less$/,
use: ExtractTextPlugin.extract(

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And this issue was fixed on my pr #140, look!!

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look at #127 then.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh my!!! This is need be update

use: ExtractTextPlugin.extract(
use: ExtractTextPlugin.extract({
fallbackLoader: 'style-loader',
loaders: [

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is right man!! Take a time for read little more about features webpack 2, because all examples described on README are using webpack 2 and in webpack 2, it's used rules array for loaders instead loaders array. So, with rules you can use use array, like recommend for webpack, for to set the loaders, or you can use loaders array or loader for a single loader.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm using Webpack ^2.2.0 and "loaders" is not valid.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because needs use rules with use for loader on webpack 2

@jhnns
Copy link
Member

jhnns commented Mar 7, 2017

Thank you for your PR. But this has changed again, see #133 (comment)

I'll merge whoever is faster 😁

@treyhuffine
Copy link
Author

Thanks @jhnns! Just made the update to the newest version. I think everything is good to go.

jhnns added a commit that referenced this pull request Mar 7, 2017
- Update links
- Remove outdated section about source maps and the extract-text-webpack-plugin
- Unify examples

Fixes #145 #143 #140 #142 #133 #127
@jhnns jhnns mentioned this pull request Mar 7, 2017
@jhnns
Copy link
Member

jhnns commented Mar 7, 2017

Haha, sorry, I just saw that there are so many PRs addressing all this so that decided to fix it for myself (#151) now and I can close a lot of PRs.

Sorry for the extra work 😁

@jhnns jhnns closed this Mar 7, 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

Successfully merging this pull request may close these issues.

3 participants