webpack-chain icon indicating copy to clipboard operation
webpack-chain copied to clipboard

Provide recipes for converting from common babel/eslint/webpack configurations

Open tauren opened this issue 7 years ago • 2 comments

It would be nice to see documentation that provides example .babelrc, .eslintrc, and webpack.config.js configurations and illustrates how they would be replicated using webpack-chain.

Note that I'm using webpack-chain via neutrino, so I'd also like to make sure I don't blow away settings that were already provided via neutrino presets.

tauren avatar Mar 01 '17 23:03 tauren

To add a bit more context, my goal is to eventually convert a project with a similar build configuration to react-boilerplate into a neutrino preset. There is a lot going on in the webpack, eslint, and babel configs, as you can see here:

Here are some ideas for example recipes. The configs for many of them are in the above links:

  • Different build settings based on dev/prod environment
  • Loading CSS Modules with PostCSS and CSSNext processing
  • Loading styled-components with PostCSS and CSSNext processing
  • Load Data URLs for Inlining small images (url-loader)
  • Loading various files (fonts, svg, png, jpg, json, mp4, etc.)
  • Support sourcemaps in dev mode
  • Supporting HMR in dev mode
  • Provide eslint support by extending standard and override with custom changes
  • Provide stylelint support by extending stylelint-config-standard and override with custom changes

I'd be happy to post example recipes in this issue as I get them working. Since I'm not all that comfortable with webpack-chain, I'd rather discuss them before creating a PR. Besides, I'm not sure if this would be seen as valuable to include or where you would want these recipes to go (main readme, separate folder of readmes, wiki, etc.)

tauren avatar Mar 03 '17 02:03 tauren

How about creating pages on the GitHub wiki? I just opened it up so anyone can edit it, so feel free to add a Recipes page and add things to it.

eliperelman avatar Mar 03 '17 23:03 eliperelman