There are several things we could potentially do for esm:
gulp serve (#27340)For more context around this effort, see https://github.com/ampproject/amphtml/issues/27386#issuecomment-604664640 and https://github.com/ampproject/amphtml/issues/27386#issuecomment-604674651.
/cc @ampproject/wg-infra, @ampproject/wg-runtime, and @ampproject/wg-performance in case anyone has comments / corrections.
Last TODO item - switch default minified mode?
Other suggestions:
@estherkim Added all your ideas to the original post. Thank you!
For those of us lacking context, do we have some sharable stated goals for this effort?
E.g. run tests against module build by default makes sense since lion's share of browsers will be running it, but will run all tests twice? Re: "esm unminified", do we keep using browserify for bundling?
Spoke to @erwinmombay today to get some more context. The high level goal is to increase confidence in the esm build as we start serving it to users. Once that happens, and once the number of users who get module (vs. no-module) due to their use of a modern browser increases, we should gradually do more of our default testing on esm builds.
I've pared down the list in the OP by removing a few items:
.mjs and .js at one time (too inefficient)esm tests on single_pass builds (performance WG has other plans)A good end goal for this effort would be that tests are run by default on esm builds, and non-esm builds continue to get some testing.
I'll let @erwinmombay and @kristoferbaxter fill in more context and correct me if I'm wrong about anything.
@choumx had a good conversation with @rsimha today.
i'd like to say that we'd ideally run both module and nomodule build with the same test matrix, but that would be too inefficient as it stands with resources and capacity.
I'd like to prioritize a few things:
i think at some point we need to get rid of browserify + babel for the dev build and move over to rollup + babel as this gives us an avenue to use it (rollup) for the production pipeline, but that is i think a longer conversation.
Only running high-level tests for no-module sounds good. But I forget -- do our visual diff/e2e tests support running on IE? 馃槄
Might be a good idea to split coverage strategy into two:
The biggest risk here I think is breaking UC browser which we officially support (unlike IE). @rsimha WDYT about a test coverage matrix one-pager for this?
do our visual diff/e2e tests support running on IE?
Visual diff needs Percy support for IE, and it's unlikely to ever happen. It might be possible to run E2E tests on IE with something like this, but we haven't tried it yet. (We added integration tests support for IE, but in two years, a grand total of one test has been enabled. So it's low priority for now.)
@danielrozenberg and @estherkim can keep me honest here.
WDYT about a test coverage matrix one-pager for this?
Will do. I'll mention these requests as well.
Most helpful comment
Spoke to @erwinmombay today to get some more context. The high level goal is to increase confidence in the esm build as we start serving it to users. Once that happens, and once the number of users who get module (vs. no-module) due to their use of a modern browser increases, we should gradually do more of our default testing on esm builds.
I've pared down the list in the OP by removing a few items:
.mjsand.jsat one time (too inefficient)esmtests onsingle_passbuilds (performance WG has other plans)A good end goal for this effort would be that tests are run by default on esm builds, and non-esm builds continue to get some testing.
I'll let @erwinmombay and @kristoferbaxter fill in more context and correct me if I'm wrong about anything.