Move the rest of the configuration into template-config.js. This way the options are explicitly in the same namespace so we won't be surprised when we add a variable with the same name as an html-webpack-plugin option.
Rename template extension to ejs for syntax-coloring purposes.
`caniuse` updated their api recently, and it appears that support for safari 8 is no longer in the last 3 versions (and it appears that safari 8 is not listed as supported there in general). explicitly add the version back in to make sure the proper `-webkit` prefixes are included for that browser.
Now that Raven is bundled with webpack, it's not available in the global context, so require it and configure it within the init module.
I struggled to figure out how to expose the raven-js module as a global, as all the combinations of `externals` and `ProvidePlugin` only applied to webpacked modules, not the global window. The correct way to do it seems to be exports-loader but that looked rather hacky and hard to understand.
Thanks @mewtaylor. Not sure what changed. When I double checked this, the common bundle was the same size with or without the option. Weirdly it also mysteriously changed its size from the last time I checked to 1.23MB. ¯\_(ツ)_/¯
This should allow us to define and update our dependencies more easily (via npm) as well as reducing the number of requests.
Additionally, when we add common packages this will avoid the issue after deploys where a user may get a cached HTML page, but new Javascript, leading to the dreaded blank page because the browser didn't download all dependencies.
Using mangle with UglifyJS also made the total file size for the common chunk bundle smaller than the current total for all of our external/polyfill scripts (1.18MB vs 1.55MB).
These depended on postcss < 5, which caused the errors like
Container#eachAtRule is deprecated. Use Container#walkAtRules instead.
Container#eachRule is deprecated. Use Container#walkRules instead.
Container#eachDecl is deprecated. Use Container#walkDecls instead.
Node#style() is deprecated. Use Node#raw()
Node#_value was deprecated. Use Node#raws.value
Container#remove is deprecated. Use Container#removeChild
The autoprefixer-loader package is deprecated now and recommends using postcss-loader + autoprefixer itself.
1. changes intl filenames to `[view].intl.js`
2. Move nav/footer rendering to `render.jsx`
3. Set locale cookie before submitting language change form
Thanks @thisandagain !
This moves all locale/translation building to a dependency, `scratch-www-intl-loader`, as well as tests associated with it. Also gets rid of the `make translations` step.
1. Load locale strings into `window._messages` in a separate file added to `template.html`, which contains view-specific and general strings
2. Update build-locales to compile separate files