Commit Graph

6 Commits

Author SHA1 Message Date
Ryan Shaw 40d1b2b2d5 add babel-plugin-transform-runtime for smaller JS
This will make our webpack bundles smaller

Test plan: 
run `yarn run webpack-production` without this
Run it again with this applied.
The output it spits out with this should be smaller

Change-Id: Ieb77a6528cd6f7759d7ebbbbc944bd9900ea90f0
Reviewed-on: https://gerrit.instructure.com/129371
Reviewed-by: Derek Bender <djbender@instructure.com>
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-10-12 14:35:46 +00:00
Derek Bender b36a52bb60 react-preset-es2015 -> react-preset-env
Per the deprecation notice on react-preset-es2015, this commit
replaces react-preset-es2015 with react-preset-env. This library
can target specific browsers and result in slimmer assets since
it only transpiles what's needed instead of everything.

context: http://babeljs.io/env

Change-Id: Ia5107776c34bed200cb45aba2d30fa7671457b12
Reviewed-on: https://gerrit.instructure.com/129307
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-10-11 20:33:44 +00:00
Ryan Shaw e5f479421d Strip out react propTypes in prod webpack build
closes: CNVS-34774

I did this before with 
https://github.com/thejameskyle/babel-react-optimize
but it had a few other transforms that were more
complex that introduced an error in the compiled
result. This enables just the propType transform
from that

test plan:
* using webpack in prod mode
* look at the javascript sources for some components,
  there shouldn’t be anything in there about PropTypes
* the generated code should be smaller & run faster

Change-Id: Idffd020c99e34fcd6fe29f916d0a8482e0d4e90d
Reviewed-on: https://gerrit.instructure.com/104202
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-03-13 23:04:17 +00:00
Ryan Shaw 01f027e2bc Revert "strip out react propTypes in prod webpack build"
this was doing something funky things in the production
webpack build eg: https://cl.ly/3q130H2z0c0u .
I am going to hold off on enabling this untill we have
a chance to really qa it well

This reverts commit 6e5aef277e.

Change-Id: I2f28b7ccc11208fb2fbc799c99aed2f1e69de241
Reviewed-on: https://gerrit.instructure.com/102569
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-02-17 18:39:03 +00:00
Ryan Shaw 6e5aef277e strip out react propTypes in prod webpack build
closes: CNVS-34774

test plan:
* using webpack in prod mode
* look at the javascript sources for some components,
  there shouldn’t be anything in there about PropTypes
* the generated code should be smaller & run faster

Change-Id: I8dede0576835a280aec77dea0e128b1e87ea8c6b
Reviewed-on: https://gerrit.instructure.com/100644
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
2017-02-08 00:12:47 +00:00
Clay Diffrient ebf63c9a60 Bump Babel to version 6
closes CNVS-29019
closes gh-817

Test Plan:
 - bundle exec rake canvas:compile_assets should compile
   /app/jsx and /specs/javascripts/jsx properly
 - Automated tests should pass
 - Areas of Canvas that use JSX/ES6 should work properly such
   as Moderated Grading, Files, and the new Admin search page

Change-Id: Ic2aefbe98dd65a9b38407a68dc569e19a9e300e2
Reviewed-on: https://gerrit.instructure.com/78232
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2016-07-15 21:55:10 +00:00