Skip to content

Commit

Permalink
Reuse unminified babel config for faster dep-checks (ampproject#33453)
Browse files Browse the repository at this point in the history
Now that we're caching the `unminified` build, there's no reason to do _another_ babel compile just to dep-check.
  • Loading branch information
jridgewell authored Mar 24, 2021
1 parent 474290f commit 632f3f8
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 65 deletions.
1 change: 0 additions & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ const {cyan, yellow} = require('kleur/colors');
*/
const babelTransforms = new Map([
['babel-jest', 'getEmptyConfig'],
['dep-check', 'getDepCheckConfig'],
['post-closure', 'getPostClosureConfig'],
['pre-closure', 'getPreClosureConfig'],
['test', 'getTestConfig'],
Expand Down
62 changes: 0 additions & 62 deletions build-system/babel-config/dep-check-config.js

This file was deleted.

2 changes: 1 addition & 1 deletion build-system/tasks/dep-check.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ async function getEntryPointModule() {
* @return {!Promise<ModuleDef>}
*/
async function getModuleGraph(entryPointModule) {
const plugin = getEsbuildBabelPlugin('dep-check', /* enableCache */ true);
const plugin = getEsbuildBabelPlugin('unminified', /* enableCache */ true);
const result = await esbuild.build({
stdin: {
contents: entryPointModule,
Expand Down
1 change: 0 additions & 1 deletion build-system/test-configs/dep-check-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,6 @@ exports.rules = [
'src/polyfills/fetch.js->src/utils/bytes.js',
'src/polyfills/intersection-observer.js->src/polyfillstub/intersection-observer-stub.js',
'src/polyfills/resize-observer.js->src/polyfillstub/resize-observer-stub.js',
'src/polyfills/promise.js->node_modules/promise-pjs/promise.js',
'src/polyfills/custom-elements.js->src/resolved-promise.js',
],
},
Expand Down

0 comments on commit 632f3f8

Please sign in to comment.