Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

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

Merged
merged 1 commit into from
Nov 26, 2018
Merged

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

merged 1 commit into from
Nov 26, 2018

Conversation

edmorley
Copy link
Member

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
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).
@@ -36,10 +36,7 @@ module.exports = (neutrino, opts = {}) => {
devServer: {
hot: opts.hot !== false
},
style: {
hot: opts.hot !== false,
Copy link
Member Author

Choose a reason for hiding this comment

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

@edmorley edmorley merged commit 6db268d into neutrinojs:master Nov 26, 2018
@edmorley edmorley deleted the refactor-style-extraction branch November 26, 2018 17:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

Successfully merging this pull request may close these issues.

2 participants