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

Provide a way to add top-level webpack config for loaders #18

Closed
insin opened this issue Dec 7, 2015 · 1 comment
Closed

Provide a way to add top-level webpack config for loaders #18

insin opened this issue Dec 7, 2015 · 1 comment

Comments

@insin
Copy link
Owner

insin commented Dec 7, 2015

Some webpack loaders have configuration which can't be expressed as a string, so can't use the current loaders means of setting config, e.g. postcss-loader and stylus-loader

@insin insin changed the title Support non-query config for loaders Provide a way to add top-level config to the webpack object Dec 10, 2015
@insin insin modified the milestone: 0.5 Dec 11, 2015
@insin
Copy link
Owner Author

insin commented Dec 11, 2015

Adding a way to either add extra things to the top level webpack config or to receive the generated config for final tweaking yourself is the nuclear option - it's so powerful that I don't want to add it until absolutely necessary.

For this one, I'm thinking that loaders in nwb.config.js should be able to define a config object which gets added to the top-level webpack config object with a pre-configured prop per loader (which loader plugin modules can configure for non-built ins which support this).

e.g. hypothetical customisation of a loader provuded by an nwb-stylus plugin:

var nib = require('nib')

module.exports = {
  type: 'react-app',
  loaders: {
    stylus: {
      config: {
        use: [
          nib()
        ]
      }
    }
  }
}

@insin insin changed the title Provide a way to add top-level config to the webpack object Provide a way to add top-level webpack config for loaders Dec 11, 2015
@insin insin closed this as completed in 1b11362 Dec 15, 2015
@insin insin mentioned this issue Dec 24, 2015
4 tasks
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

1 participant