New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Keep AMP_CONFIG writing in sync with production release script. #24471
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of comments below.
build-system/tasks/helpers.js
Outdated
'amp-inabox.js', | ||
'alp.max.js', | ||
'integration.js', | ||
'amp-shadow.js', | ||
'amp-esm.js', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Alphabetize?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorted MINIFIED list in alphabetic order. and kept same ordering in this UNMINIFIED list
build-system/tasks/helpers.js
Outdated
'amp4ads-v0.js', | ||
'alp.js', | ||
'f.js', | ||
'shadow-v0.js', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there no minified esm target?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see amp-esm.js referenced anywhere else. is it still a thing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe it is.
amphtml/build-system/tasks/dist.js
Lines 159 to 165 in 8fe8186
if (argv.esm) { | |
await Promise.all([ | |
createModuleCompatibleES5Bundle('v0.js'), | |
createModuleCompatibleES5Bundle('amp4ads-v0.js'), | |
createModuleCompatibleES5Bundle('shadow-v0.js'), | |
]); | |
} |
Lines 47 to 51 in b6d45be
// `dist` builds do not use any of the default settings below until its | |
// an esm build. (Both Multipass and Singlepass) | |
if (isDist && !esm) { | |
return {}; | |
} |
amphtml/build-system/compile/compile.js
Lines 150 to 154 in 36b7f5c
// Add babel plugin to remove unwanted polyfills in esm build | |
if (options.esmPassCompilation) { | |
compilationOptions['dest'] = './dist/esm/'; | |
define.push('ESM_BUILD=true'); | |
} |
amphtml/build-system/tasks/helpers.js
Lines 192 to 199 in b11fe0e
doBuildJs(jsBundles, 'amp.js', { | |
watch, | |
minify, | |
wrapper: wrappers.mainBinary, | |
singlePassCompilation: argv.single_pass, | |
esmPassCompilation: argv.esm, | |
includeOnlyESMLevelPolyfills: argv.esm, | |
}), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so is there still an output file named amp-esm.js
? seems it will just be amp.js
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just checked, you are right. Sorry. Carry on :)
PS: We should probably remove amp-esm.js
from UNMINIFIED_TARGETS
.
'amp-inabox.js', | ||
'alp.max.js', | ||
'integration.js', | ||
'amp-shadow.js', | ||
'amp-esm.js', | ||
]; | ||
|
||
/** | ||
* List of minified targets to which AMP_CONFIG should be written |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might make sense to add a comment here to keep both lists in sync with the release scripts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
No description provided.