Skip to content

All common gulp commands should be able to run from a clean state #9640

@dreamofabear

Description

@dreamofabear

Currently it's necessary to run gulp build --css-only before gulp dist to avoid errors like:

Error compiling ./src/service-worker/kill.js
WARNING - Failed to load module "../../../build/amp-ad-0.1.css.js"
WARNING - Failed to load module "../../../build/amp-form-0.1.css.js"
0 error(s), 2 warning(s)

The issue is missing extension-specific CSS*, however gulp build also does a bunch of work in addition to that. We can speed up our builds by making sure that compileCss() and buildExtensions() (CSS only) are run before compiling entry points.

*Another option is to figure out why extension-specific CSS is necessary for building srcs like service-worker. First guess is the quirk that Closure compiler (compile.js) checks the existence of the list of source files to build.

/cc @rsimha-amp @erwinmombay

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions