Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/thejohnfreeman/react-hot-boilerplate


https://github.com/thejohnfreeman/react-hot-boilerplate

Last synced: 21 days ago
JSON representation

Awesome Lists containing this project

README

        

config is a commonjs module; export an object

entry must use relative path starting with './'

associate loaders with filetypes using module.loaders:
test: regex for filename
loaders: plugins as a list
loader: shorthand, !-separated plugin names; not my favorite

webpack-dev-server can be run from npm script
npm creates PATH from installed modules
so add webpack and webpack-dev-server as dev-deps

webpack-dev-server alone will not browsersync, but --inline will (by
including script for web socket in bundle)

--optimize-minimize for minification (not default)
--devtool sourcemap ?
--output-pathinfo ?
--debug ?

HtmlWebpackPlugin // construct HTML from a template (injects scripts and styles)
NoErrorsPlugin // do not refresh browser when there are errors

babel plugins to compile react, es2015 are dev-deps
deps taken from react-hot-boilerplate

resolve.root says where to find require('component/file.js')

module.loaders.include is faster than module.loaders.exclude is faster than
ignore in babelrc

React must be included in any module that uses JSX
--inline will always reload full page
cannot hot reload the module that calls ReactDom.render
react-hot requires webpack-dev-server entry point

most basic assets require file-loader
url-loader can be used instead of file-loader as an optimization