diff --git a/build-system/compile/bundles.config.extensions.json b/build-system/compile/bundles.config.extensions.json index c9c1be95a07b..48874bd0d761 100644 --- a/build-system/compile/bundles.config.extensions.json +++ b/build-system/compile/bundles.config.extensions.json @@ -32,12 +32,7 @@ "latestVersion": "0.1", "options": { "hasCss": true, - "npm": { - "component.js": { - "preact": "component-preact.js", - "react": "component-react.js" - } - } + "npm": true } }, {"name": "amp-action-macro", "version": "0.1", "latestVersion": "0.1"}, @@ -150,12 +145,7 @@ "version": "1.0", "latestVersion": "0.1", "options": { - "npm": { - "component.js": { - "preact": "component-preact.js", - "react": "component-react.js" - } - } + "npm": true } }, { @@ -168,12 +158,7 @@ "version": "1.0", "latestVersion": "0.1", "options": { - "npm": { - "component.js": { - "preact": "component-preact.js", - "react": "component-react.js" - } - } + "npm": true } }, { @@ -211,12 +196,7 @@ "latestVersion": "0.1", "options": { "hasCss": true, - "npm": { - "component.js": { - "preact": "component-preact.js", - "react": "component-react.js" - } - } + "npm": true } }, {"name": "amp-font", "version": "0.1", "latestVersion": "0.1"}, @@ -297,12 +277,7 @@ "options": { "hasCss": true, "cssBinaries": ["amp-inline-gallery-pagination"], - "npm": { - "component.js": { - "preact": "component-preact.js", - "react": "component-react.js" - } - } + "npm": true } }, {"name": "amp-inputmask", "version": "0.1", "latestVersion": "0.1"}, @@ -318,12 +293,7 @@ "latestVersion": "0.1", "options": { "hasCss": true, - "npm": { - "component.js": { - "preact": "component-preact.js", - "react": "component-react.js" - } - } + "npm": true } }, { @@ -351,12 +321,7 @@ "latestVersion": "0.1", "options": { "hasCss": true, - "npm": { - "component.js": { - "preact": "component-preact.js", - "react": "component-react.js" - } - } + "npm": true } }, { @@ -485,12 +450,7 @@ "latestVersion": "0.1", "options": { "hasCss": true, - "npm": { - "component.js": { - "preact": "component-preact.js", - "react": "component-react.js" - } - } + "npm": true } }, { @@ -652,12 +612,7 @@ "version": "1.0", "latestVersion": "0.1", "options": { - "npm": { - "component.js": { - "preact": "component-preact.js", - "react": "component-react.js" - } - } + "npm": true } }, { @@ -739,12 +694,7 @@ "latestVersion": "0.1", "options": { "hasCss": true, - "npm": { - "component.js": { - "preact": "component-preact.js", - "react": "component-react.js" - } - } + "npm": true } } ] diff --git a/build-system/tasks/extension-helpers.js b/build-system/tasks/extension-helpers.js index a8d0c24141ef..f24c02d71b75 100644 --- a/build-system/tasks/extension-helpers.js +++ b/build-system/tasks/extension-helpers.js @@ -565,7 +565,16 @@ function buildExtensionCss(extDir, name, version, options) { * @return {!Promise} */ function buildNpmBinaries(extDir, options) { - const {npm} = options; + let {npm} = options; + if (npm === true) { + // Default to the standard/expected entrypoint + npm = { + 'component.js': { + 'preact': 'component-preact.js', + 'react': 'component-react.js', + }, + }; + } const keys = Object.keys(npm); const promises = keys.flatMap((entryPoint) => { const {preact, react} = npm[entryPoint];