Use current Sentry browser package and forward errorId into eventId
Fix up errorInfo reference
Put Sentry on the window object for GUI to use
Remove unneeded reference to old style Raven and raven-js
Move Sentry webpack config into production only
Add GA tracker ID to window
Allows scratch-gui to use same GA id
- `/preview/editor` will load GUI with an empty project
- `/preview/:id/editor` will load GUI with a project from the projects server (not local data)
- passes intl object to GUI
- `/preview/:id` with show the project page with an embedded player
- `/preview/:id/fullscreen` will load the project page with the player in fullscreen mode.
* Note that we needed to Increase memory for the build to avoid running out of heap space, and build time increases by about 2 minutes
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.