Conversation
cacebf2 to
26926aa
Compare
.babelrc
Outdated
| ["env", { | ||
| "loose": true, | ||
| "targets": { | ||
| "browsers": ["last 2 versions", "safari >= 7"] |
There was a problem hiding this comment.
@jridgewell please correct this if needed
cc @cramforce
There was a problem hiding this comment.
@jridgewell im guessing you want this dynamic based on the original issue, depending on if we're in test or dev mode etc.
There was a problem hiding this comment.
Yes, CI would get this string (safari >= 9, though is what I think we support), and in dev testing we would use the latest Chrome
jridgewell
left a comment
There was a problem hiding this comment.
This is awesome that it worked so seamlessly!
| } | ||
| _parseError.prototype = Error; | ||
|
|
||
| throw new _parseError(str, hash); |
There was a problem hiding this comment.
babel6 was erroring out on some label statements in the generated jison file (because of use strict + label usage), i tried upgrading jison and regenerated the files but it was still failing and had to add the "transform-remove-strict-mode" plugin to get it to work.
There was a problem hiding this comment.
specifically its this line https://github.com/ampproject/amphtml/pull/9775/files#diff-8d20dae7ae84978e5dba004cfa21ff72L304
There was a problem hiding this comment.
Odd, that line shouldn't throw. 😞
jridgewell
left a comment
There was a problem hiding this comment.
Please log the built file sizes (both build and dist). Doesn't need to be part of the PR, just a comment is fine.
gulpfile.js
Outdated
| } | ||
|
|
||
| var browsers = [ | ||
| process.env.TRAVIS ? "safari >= 9" : "Last 1 Chrome versions" |
There was a problem hiding this comment.
This needs the "last 2 versions" in Travis.
|
Nice! |
|
I ended up into this issue when last time trying to do babel6: babel/babel#4480 I suppose this has been fixed by one of the plugin? |
a96a5b4 to
c3537aa
Compare
| @@ -1,98 +1,98 @@ | |||
| max | min | gzip | file | |||
| --- | --- | --- | --- | |||
| 290 kB | 31.63 kB | 12.49 kB | alp.js / alp.max.js | |||
There was a problem hiding this comment.
@jridgewell seems to be some hefty increases on the babel sizes, lmk if theres any option that i missed turning on/off that would have done this.
it doesnt really affect the files we serve built from CC.
There was a problem hiding this comment.
This is because of babel-polyfill which is MASSIVE
1f55f26 to
c22f11b
Compare
|
|
||
| const port = new WindowPortEmulator( | ||
| this.win, viewerOrigin); | ||
| window, viewerOrigin); |
There was a problem hiding this comment.
@chenshay can you double check that this is ok
| "prepend-v0": "gulp prepend-global --prod node_modules/AMP_CONFIG.json --local --target dist/v0.js && gulp prepend-global --prod node_modules/AMP_CONFIG.json --local --target dist.3p/current-min/f.js" | ||
| }, | ||
| "dependencies": { | ||
| "babel-polyfill": "6.26.0", |
There was a problem hiding this comment.
Hopefully this isn't needed.
There was a problem hiding this comment.
unfortunately it is needed for regenerator-runtime
There was a problem hiding this comment.
I think regenerator only needs some symbol polyfills, which should be much smaller than the entire babel-polyfill.
There was a problem hiding this comment.
@jridgewell my expectation was babel-preset-env would have figured that out and added the polyfill but all the issues i found told me to include babel-polyfill. is there a specific package i can include that will allow me to remove babel-polyfill?
There was a problem hiding this comment.
We can either drop regenerator (loose generator support in Safari 9), or dig through the regenerator runtime code to see what we need.
There was a problem hiding this comment.
@jridgewell got it. do you mind if i create a separate issue/pr for that and merge this?
| @@ -1,98 +1,98 @@ | |||
| max | min | gzip | file | |||
| --- | --- | --- | --- | |||
| 290 kB | 31.63 kB | 12.49 kB | alp.js / alp.max.js | |||
There was a problem hiding this comment.
This is because of babel-polyfill which is MASSIVE
c22f11b to
4eddc11
Compare
|
follow up issue here #11291 |
|
@erwinmombay @danielrozenberg all yarn dependencies were removed in #11279. Looks like this PR wasn't rebased properly, and has re-added yarn.lock. It'll need to be removed again. |
Closes #9695