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

Move style extraction conditionals from web into style-loader #1221

Merged
merged 1 commit into from Nov 26, 2018

Conversation

@edmorley
Copy link
Member

edmorley commented Nov 23, 2018

Previously the NODE_ENV check for determining whether to enable stylesheet extraction existed only in @neutrinojs/web, meaning that if @neutrinojs/style-loader was manually used (either on its own or in coordination with the web preset), then extraction would be incorrectly enabled in development.

The style.extract = false shorthand of always disabling extraction still works, however style.extract = true must now be replaced by style.extract.enabled = true (though I believe that style is not likely to have been used by many projects, since it's more common to want to disable in production than enable in development).

@edmorley edmorley added this to the v9 milestone Nov 23, 2018
@edmorley edmorley self-assigned this Nov 23, 2018
@edmorley edmorley changed the title Move style extraction handling from web into style-loader Move style extraction conditionals from web into style-loader Nov 23, 2018
@edmorley edmorley force-pushed the edmorley:refactor-style-extraction branch from 8484818 to 1a9c6bc Nov 23, 2018
Previously the `NODE_ENV` check for determining whether to enable
stylesheet extraction existed only in `@neutrinojs/web`, meaning
that if `@neutrinojs/style-loader` was manually used (either on its
own or in coordination with the web preset), then extraction would
be incorrectly enabled in development.

The `style.extract = false` shorthand of always disabling extraction
still works, however `style.extract = true` must now be replaced by
`style.extract.enabled = true` (though I believe that style is not
likely to have been used by many projects, since it's more common
to want to disable in production than enable in development).
@edmorley edmorley force-pushed the edmorley:refactor-style-extraction branch from 1a9c6bc to 1c0dfc0 Nov 23, 2018
@@ -36,10 +36,7 @@ module.exports = (neutrino, opts = {}) => {
devServer: {
hot: opts.hot !== false
},
style: {
hot: opts.hot !== false,

This comment has been minimized.

@edmorley edmorley requested a review from eliperelman Nov 23, 2018
@edmorley edmorley merged commit 6db268d into neutrinojs:master Nov 26, 2018
6 checks passed
6 checks passed
Header rules No header rules processed
Details
Pages changed 1 new file uploaded
Details
Mixed content No mixed content detected
Details
Redirect rules 2 redirect rules processed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
deploy/netlify Deploy preview ready!
Details
@edmorley edmorley deleted the edmorley:refactor-style-extraction branch Nov 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
You can’t perform that action at this time.