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

Locals and ExtractTextPlugin #71

Closed
vjpr opened this issue Jun 7, 2015 · 5 comments
Closed

Locals and ExtractTextPlugin #71

vjpr opened this issue Jun 7, 2015 · 5 comments

Comments

@vjpr
Copy link

vjpr commented Jun 7, 2015

When I use local-scoped vars the require statement returns the selector names.

But when I use the ExtractTextPlugin, the selectors are no longer returned.

Should ExtractTextPlugin pass through the selectors hash from css-loader?

@vjpr
Copy link
Author

vjpr commented Jun 7, 2015

@sokra Can you confirm your example works here: #59 (comment)

Specifically this:

// client bundle with prerendering or optimized with separate css
{
            test: /\.scss$/,
            loader: ExtractTextPlugin.extract('style', 'css?module&localIdentName=[name]__[local]___[hash:base64:5]!sass'),
            include: appPath
}

Only difference in my code is I am not using module&localIndentName but it works without ExtractTextPlugin.

@sokra
Copy link
Member

sokra commented Jun 7, 2015

This should work. I've done it here already : https://github.com/webpack/react-starter

@vjpr
Copy link
Author

vjpr commented Jun 7, 2015

If I set {remove: false} in the extract text loader, the require statement returns an object, with my selector in {locals: {...}}. The return value from the require should be just the contents of locals (or at least it is without the using the plugin.

@vjpr
Copy link
Author

vjpr commented Jun 7, 2015

Hold on, my plugin is very out of date. Let me try upgrade.

@vjpr
Copy link
Author

vjpr commented Jun 7, 2015

Fixed. Was on v0.3 of the extract text plugin. Silly me, apologies!

@vjpr vjpr closed this as completed Jun 7, 2015
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