Skip to content

Instantly share code, notes, and snippets.

@jide
Created August 9, 2016 01:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jide/77a2bfc5ebc7a19d04e803fa3d5a8981 to your computer and use it in GitHub Desktop.
Save jide/77a2bfc5ebc7a19d04e803fa3d5a8981 to your computer and use it in GitHub Desktop.
Tooling presets
// package.json
{
//...
"tooling": {
"presets": [
"modern", // es2015, stage-0, autoprefixer...
"react",
"redux",
"react-router",
"css-modules",
"less",
"custom", // our own modifier if needed
"module", // will make tooling for publishing as a module
"dev" // hmr, devServer, devTools...
]
}
}
// a set can :
// - change webpack conf
// - change babel conf
// - change package.json
// - access an api (list presets, ...)
// modern :
// - babel
// - "presets": ["es2015", "stage-0"]
// - package.json
// - "babel": "6.*",
// ...
// - webpack
// - babel-loader
// - postcss/autoprefixer
// react :
// - babel
// - "presets": ["react"]
// - webpack
// - if presets.dev: hmr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment