diff --git a/extensions/amp-accordion/1.0/package.json b/extensions/amp-accordion/1.0/package.json index 86538fe0d9fe..088782e839a4 100644 --- a/extensions/amp-accordion/1.0/package.json +++ b/extensions/amp-accordion/1.0/package.json @@ -4,20 +4,20 @@ "description": "AMP Accordion Component", "author": "The AMP HTML Authors", "license": "Apache-2.0", - "main": "dist/component.js", - "module": "dist/component.mjs", + "main": "./dist/component.js", + "module": "./dist/component-preact.module.js", "exports": { - ".": "./preact", - "./preact": { - "import": "dist/component-preact.mjs", - "require": "dist/component-preact.js" - }, - "./react": { - "import": "dist/component-react.mjs", - "require": "dist/component-react.js" - } + ".": "./preact", + "./preact": { + "import": "./dist/component-preact.module.js", + "require": "./dist/component-preact.js" + }, + "./react": { + "import": "./dist/component-react.module.js", + "require": "./dist/component-react.js" + } }, - "files": ["dist/*"], + "files": ["dist/*", "react.js"], "repository": { "type": "git", "url": "https://github.com/ampproject/amphtml.git", diff --git a/extensions/amp-accordion/1.0/react.js b/extensions/amp-accordion/1.0/react.js new file mode 100644 index 000000000000..0b2957c35c38 --- /dev/null +++ b/extensions/amp-accordion/1.0/react.js @@ -0,0 +1,19 @@ +/** + * Copyright 2021 The AMP HTML Authors. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS-IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* eslint-env node */ +// eslint-disable-next-line local/no-module-exports +module.exports = require('./dist/component-react'); diff --git a/extensions/amp-base-carousel/1.0/package.json b/extensions/amp-base-carousel/1.0/package.json index 79087a120b5e..dbc47a4611ad 100644 --- a/extensions/amp-base-carousel/1.0/package.json +++ b/extensions/amp-base-carousel/1.0/package.json @@ -4,20 +4,20 @@ "description": "AMP Base Carousel Component", "author": "The AMP HTML Authors", "license": "Apache-2.0", - "main": "dist/component.js", - "module": "dist/component.mjs", + "main": "./dist/component.js", + "module": "./dist/component-preact.module.js", "exports": { ".": "./preact", "./preact": { - "import": "dist/component-preact.mjs", - "require": "dist/component-preact.js" + "import": "./dist/component-preact.module.js", + "require": "./dist/component-preact.js" }, "./react": { - "import": "dist/component-react.mjs", - "require": "dist/component-react.js" + "import": "./dist/component-react.module.js", + "require": "./dist/component-react.js" } }, - "files": ["dist/*"], + "files": ["dist/*", "react.js"], "repository": { "type": "git", "url": "https://github.com/ampproject/amphtml.git", diff --git a/extensions/amp-base-carousel/1.0/react.js b/extensions/amp-base-carousel/1.0/react.js new file mode 100644 index 000000000000..0b2957c35c38 --- /dev/null +++ b/extensions/amp-base-carousel/1.0/react.js @@ -0,0 +1,19 @@ +/** + * Copyright 2021 The AMP HTML Authors. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS-IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* eslint-env node */ +// eslint-disable-next-line local/no-module-exports +module.exports = require('./dist/component-react'); diff --git a/extensions/amp-date-countdown/1.0/package.json b/extensions/amp-date-countdown/1.0/package.json index 823a786458b1..e92e7b76c4b5 100644 --- a/extensions/amp-date-countdown/1.0/package.json +++ b/extensions/amp-date-countdown/1.0/package.json @@ -4,20 +4,20 @@ "description": "AMP Date Countdown Component", "author": "The AMP HTML Authors", "license": "Apache-2.0", - "main": "dist/component.js", - "module": "dist/component.mjs", + "main": "./dist/component.js", + "module": "./dist/component-preact.module.js", "exports": { ".": "./preact", "./preact": { - "import": "dist/component-preact.mjs", - "require": "dist/component-preact.js" + "import": "./dist/component-preact.module.js", + "require": "./dist/component-preact.js" }, "./react": { - "import": "dist/component-react.mjs", - "require": "dist/component-react.js" + "import": "./dist/component-react.module.js", + "require": "./dist/component-react.js" } }, - "files": ["dist/*"], + "files": ["dist/*", "react.js"], "repository": { "type": "git", "url": "https://github.com/ampproject/amphtml.git", diff --git a/extensions/amp-date-countdown/1.0/react.js b/extensions/amp-date-countdown/1.0/react.js new file mode 100644 index 000000000000..0b2957c35c38 --- /dev/null +++ b/extensions/amp-date-countdown/1.0/react.js @@ -0,0 +1,19 @@ +/** + * Copyright 2021 The AMP HTML Authors. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS-IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* eslint-env node */ +// eslint-disable-next-line local/no-module-exports +module.exports = require('./dist/component-react'); diff --git a/extensions/amp-date-display/1.0/package.json b/extensions/amp-date-display/1.0/package.json index 714e1223774e..2201d53e13a2 100644 --- a/extensions/amp-date-display/1.0/package.json +++ b/extensions/amp-date-display/1.0/package.json @@ -4,20 +4,20 @@ "description": "AMP Date Display Component", "author": "The AMP HTML Authors", "license": "Apache-2.0", - "main": "dist/component.js", - "module": "dist/component.mjs", + "main": "./dist/component.js", + "module": "./dist/component-preact.module.js", "exports": { ".": "./preact", "./preact": { - "import": "dist/component-preact.mjs", - "require": "dist/component-preact.js" + "import": "./dist/component-preact.module.js", + "require": "./dist/component-preact.js" }, "./react": { - "import": "dist/component-react.mjs", - "require": "dist/component-react.js" + "import": "./dist/component-react.module.js", + "require": "./dist/component-react.js" } }, - "files": ["dist/*"], + "files": ["dist/*", "react.js"], "repository": { "type": "git", "url": "https://github.com/ampproject/amphtml.git", diff --git a/extensions/amp-date-display/1.0/react.js b/extensions/amp-date-display/1.0/react.js new file mode 100644 index 000000000000..0b2957c35c38 --- /dev/null +++ b/extensions/amp-date-display/1.0/react.js @@ -0,0 +1,19 @@ +/** + * Copyright 2021 The AMP HTML Authors. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS-IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* eslint-env node */ +// eslint-disable-next-line local/no-module-exports +module.exports = require('./dist/component-react'); diff --git a/extensions/amp-fit-text/1.0/package.json b/extensions/amp-fit-text/1.0/package.json index 1e4f008aa325..947fb2376f28 100644 --- a/extensions/amp-fit-text/1.0/package.json +++ b/extensions/amp-fit-text/1.0/package.json @@ -4,20 +4,20 @@ "description": "AMP Fit Text Component", "author": "The AMP HTML Authors", "license": "Apache-2.0", - "main": "dist/component.js", - "module": "dist/component.mjs", + "main": "./dist/component.js", + "module": "./dist/component-preact.module.js", "exports": { ".": "./preact", "./preact": { - "import": "dist/component-preact.mjs", - "require": "dist/component-preact.js" + "import": "./dist/component-preact.module.js", + "require": "./dist/component-preact.js" }, "./react": { - "import": "dist/component-react.mjs", - "require": "dist/component-react.js" + "import": "./dist/component-react.module.js", + "require": "./dist/component-react.js" } }, - "files": ["dist/*"], + "files": ["dist/*", "react.js"], "repository": { "type": "git", "url": "https://github.com/ampproject/amphtml.git", diff --git a/extensions/amp-fit-text/1.0/react.js b/extensions/amp-fit-text/1.0/react.js new file mode 100644 index 000000000000..0b2957c35c38 --- /dev/null +++ b/extensions/amp-fit-text/1.0/react.js @@ -0,0 +1,19 @@ +/** + * Copyright 2021 The AMP HTML Authors. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS-IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* eslint-env node */ +// eslint-disable-next-line local/no-module-exports +module.exports = require('./dist/component-react'); diff --git a/extensions/amp-inline-gallery/1.0/package.json b/extensions/amp-inline-gallery/1.0/package.json index 38b56fe88460..7f104f1dbd31 100644 --- a/extensions/amp-inline-gallery/1.0/package.json +++ b/extensions/amp-inline-gallery/1.0/package.json @@ -4,20 +4,20 @@ "description": "AMP Inline Gallery Component", "author": "The AMP HTML Authors", "license": "Apache-2.0", - "main": "dist/component.js", - "module": "dist/component.mjs", + "main": "./dist/component.js", + "module": "./dist/component-preact.module.js", "exports": { ".": "./preact", "./preact": { - "import": "dist/component-preact.mjs", - "require": "dist/component-preact.js" + "import": "./dist/component-preact.module.js", + "require": "./dist/component-preact.js" }, "./react": { - "import": "dist/component-react.mjs", - "require": "dist/component-react.js" + "import": "./dist/component-react.module.js", + "require": "./dist/component-react.js" } }, - "files": ["dist/*"], + "files": ["dist/*", "react.js"], "repository": { "type": "git", "url": "https://github.com/ampproject/amphtml.git", diff --git a/extensions/amp-inline-gallery/1.0/react.js b/extensions/amp-inline-gallery/1.0/react.js new file mode 100644 index 000000000000..0b2957c35c38 --- /dev/null +++ b/extensions/amp-inline-gallery/1.0/react.js @@ -0,0 +1,19 @@ +/** + * Copyright 2021 The AMP HTML Authors. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS-IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* eslint-env node */ +// eslint-disable-next-line local/no-module-exports +module.exports = require('./dist/component-react'); diff --git a/extensions/amp-instagram/1.0/package.json b/extensions/amp-instagram/1.0/package.json index ce0c7bd7264d..7bf0fe5fd3ec 100644 --- a/extensions/amp-instagram/1.0/package.json +++ b/extensions/amp-instagram/1.0/package.json @@ -4,20 +4,20 @@ "description": "AMP Instagram Component", "author": "The AMP HTML Authors", "license": "Apache-2.0", - "main": "dist/component.js", - "module": "dist/component.mjs", + "main": "./dist/component.js", + "module": "./dist/component-preact.module.js", "exports": { ".": "./preact", "./preact": { - "import": "dist/component-preact.mjs", - "require": "dist/component-preact.js" + "import": "./dist/component-preact.module.js", + "require": "./dist/component-preact.js" }, "./react": { - "import": "dist/component-react.mjs", - "require": "dist/component-react.js" + "import": "./dist/component-react.module.js", + "require": "./dist/component-react.js" } }, - "files": ["dist/*"], + "files": ["dist/*", "react.js"], "repository": { "type": "git", "url": "https://github.com/ampproject/amphtml.git", diff --git a/extensions/amp-instagram/1.0/react.js b/extensions/amp-instagram/1.0/react.js new file mode 100644 index 000000000000..0b2957c35c38 --- /dev/null +++ b/extensions/amp-instagram/1.0/react.js @@ -0,0 +1,19 @@ +/** + * Copyright 2021 The AMP HTML Authors. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS-IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* eslint-env node */ +// eslint-disable-next-line local/no-module-exports +module.exports = require('./dist/component-react'); diff --git a/extensions/amp-lightbox/1.0/package.json b/extensions/amp-lightbox/1.0/package.json index 9b51a9d15a8d..89af2978cf8c 100644 --- a/extensions/amp-lightbox/1.0/package.json +++ b/extensions/amp-lightbox/1.0/package.json @@ -4,20 +4,20 @@ "description": "AMP Lightbox Component", "author": "The AMP HTML Authors", "license": "Apache-2.0", - "main": "dist/component.js", - "module": "dist/component.mjs", + "main": "./dist/component.js", + "module": "./dist/component-preact.module.js", "exports": { ".": "./preact", "./preact": { - "import": "dist/component-preact.mjs", - "require": "dist/component-preact.js" + "import": "./dist/component-preact.module.js", + "require": "./dist/component-preact.js" }, "./react": { - "import": "dist/component-react.mjs", - "require": "dist/component-react.js" + "import": "./dist/component-react.module.js", + "require": "./dist/component-react.js" } }, - "files": ["dist/*"], + "files": ["dist/*", "react.js"], "repository": { "type": "git", "url": "https://github.com/ampproject/amphtml.git", diff --git a/extensions/amp-lightbox/1.0/react.js b/extensions/amp-lightbox/1.0/react.js new file mode 100644 index 000000000000..0b2957c35c38 --- /dev/null +++ b/extensions/amp-lightbox/1.0/react.js @@ -0,0 +1,19 @@ +/** + * Copyright 2021 The AMP HTML Authors. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS-IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* eslint-env node */ +// eslint-disable-next-line local/no-module-exports +module.exports = require('./dist/component-react'); diff --git a/extensions/amp-selector/1.0/package.json b/extensions/amp-selector/1.0/package.json index 8565713cc08d..de13cb2108d5 100644 --- a/extensions/amp-selector/1.0/package.json +++ b/extensions/amp-selector/1.0/package.json @@ -4,20 +4,20 @@ "description": "AMP Selector Component", "author": "The AMP HTML Authors", "license": "Apache-2.0", - "main": "dist/component.js", - "module": "dist/component.mjs", + "main": "./dist/component.js", + "module": "./dist/component-preact.module.js", "exports": { ".": "./preact", "./preact": { - "import": "dist/component-preact.mjs", - "require": "dist/component-preact.js" + "import": "./dist/component-preact.module.js", + "require": "./dist/component-preact.js" }, "./react": { - "import": "dist/component-react.mjs", - "require": "dist/component-react.js" + "import": "./dist/component-react.module.js", + "require": "./dist/component-react.js" } }, - "files": ["dist/*"], + "files": ["dist/*", "react.js"], "repository": { "type": "git", "url": "https://github.com/ampproject/amphtml.git", diff --git a/extensions/amp-selector/1.0/react.js b/extensions/amp-selector/1.0/react.js new file mode 100644 index 000000000000..0b2957c35c38 --- /dev/null +++ b/extensions/amp-selector/1.0/react.js @@ -0,0 +1,19 @@ +/** + * Copyright 2021 The AMP HTML Authors. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS-IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* eslint-env node */ +// eslint-disable-next-line local/no-module-exports +module.exports = require('./dist/component-react'); diff --git a/extensions/amp-stream-gallery/1.0/package.json b/extensions/amp-stream-gallery/1.0/package.json index fa5afd59ae7e..cbd3fb2a9e56 100644 --- a/extensions/amp-stream-gallery/1.0/package.json +++ b/extensions/amp-stream-gallery/1.0/package.json @@ -4,20 +4,20 @@ "description": "AMP Stream Gallery Component", "author": "The AMP HTML Authors", "license": "Apache-2.0", - "main": "dist/component.js", - "module": "dist/component.mjs", + "main": "./dist/component.js", + "module": "./dist/component-preact.module.js", "exports": { ".": "./preact", "./preact": { - "import": "dist/component-preact.mjs", - "require": "dist/component-preact.js" + "import": "./dist/component-preact.module.js", + "require": "./dist/component-preact.js" }, "./react": { - "import": "dist/component-react.mjs", - "require": "dist/component-react.js" + "import": "./dist/component-react.module.js", + "require": "./dist/component-react.js" } }, - "files": ["dist/*"], + "files": ["dist/*", "react.js"], "repository": { "type": "git", "url": "https://github.com/ampproject/amphtml.git", diff --git a/extensions/amp-stream-gallery/1.0/react.js b/extensions/amp-stream-gallery/1.0/react.js new file mode 100644 index 000000000000..0b2957c35c38 --- /dev/null +++ b/extensions/amp-stream-gallery/1.0/react.js @@ -0,0 +1,19 @@ +/** + * Copyright 2021 The AMP HTML Authors. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS-IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* eslint-env node */ +// eslint-disable-next-line local/no-module-exports +module.exports = require('./dist/component-react'); diff --git a/extensions/amp-timeago/1.0/package.json b/extensions/amp-timeago/1.0/package.json index 2189f7658e32..216a1c6252f7 100644 --- a/extensions/amp-timeago/1.0/package.json +++ b/extensions/amp-timeago/1.0/package.json @@ -4,20 +4,20 @@ "description": "AMP Time Ago Component", "author": "The AMP HTML Authors", "license": "Apache-2.0", - "main": "dist/component.js", - "module": "dist/component.mjs", + "main": "./dist/component.js", + "module": "./dist/component-preact.module.js", "exports": { - ".": "./preact", - "./preact": { - "import": "dist/component-preact.mjs", - "require": "dist/component-preact.js" - }, - "./react": { - "import": "dist/component-react.mjs", - "require": "dist/component-react.js" - } + ".": "./preact", + "./preact": { + "import": "./dist/component-preact.module.js", + "require": "./dist/component-preact.js" + }, + "./react": { + "import": "./dist/component-react.module.js", + "require": "./dist/component-react.js" + } }, - "files": ["dist/*"], + "files": ["dist/*", "react.js"], "repository": { "type": "git", "url": "https://github.com/ampproject/amphtml.git", diff --git a/extensions/amp-timeago/1.0/react.js b/extensions/amp-timeago/1.0/react.js new file mode 100644 index 000000000000..0b2957c35c38 --- /dev/null +++ b/extensions/amp-timeago/1.0/react.js @@ -0,0 +1,19 @@ +/** + * Copyright 2021 The AMP HTML Authors. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS-IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* eslint-env node */ +// eslint-disable-next-line local/no-module-exports +module.exports = require('./dist/component-react'); diff --git a/extensions/amp-twitter/1.0/package.json b/extensions/amp-twitter/1.0/package.json index 6b280db87498..0a076efe00ce 100644 --- a/extensions/amp-twitter/1.0/package.json +++ b/extensions/amp-twitter/1.0/package.json @@ -4,20 +4,20 @@ "description": "AMP Twitter Component", "author": "The AMP HTML Authors", "license": "Apache-2.0", - "main": "dist/component.js", - "module": "dist/component.mjs", + "main": "./dist/component.js", + "module": "./dist/component-preact.module.js", "exports": { ".": "./preact", "./preact": { - "import": "dist/component-preact.mjs", - "require": "dist/component-preact.js" + "import": "./dist/component-preact.module.js", + "require": "./dist/component-preact.js" }, "./react": { - "import": "dist/component-react.mjs", - "require": "dist/component-react.js" + "import": "./dist/component-react.module.js", + "require": "./dist/component-react.js" } }, - "files": ["dist/*"], + "files": ["dist/*", "react.js"], "repository": { "type": "git", "url": "https://github.com/ampproject/amphtml.git", diff --git a/extensions/amp-twitter/1.0/react.js b/extensions/amp-twitter/1.0/react.js new file mode 100644 index 000000000000..0b2957c35c38 --- /dev/null +++ b/extensions/amp-twitter/1.0/react.js @@ -0,0 +1,19 @@ +/** + * Copyright 2021 The AMP HTML Authors. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS-IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* eslint-env node */ +// eslint-disable-next-line local/no-module-exports +module.exports = require('./dist/component-react'); diff --git a/extensions/amp-youtube/1.0/package.json b/extensions/amp-youtube/1.0/package.json index 8a92faa9e20a..59a786642cdc 100644 --- a/extensions/amp-youtube/1.0/package.json +++ b/extensions/amp-youtube/1.0/package.json @@ -4,20 +4,20 @@ "description": "AMP Youtube Component", "author": "The AMP HTML Authors", "license": "Apache-2.0", - "main": "dist/component.js", - "module": "dist/component.mjs", + "main": "./dist/component.js", + "module": "./dist/component-preact.module.js", "exports": { ".": "./preact", "./preact": { - "import": "dist/component-preact.mjs", - "require": "dist/component-preact.js" + "import": "./dist/component-preact.module.js", + "require": "./dist/component-preact.js" }, "./react": { - "import": "dist/component-react.mjs", - "require": "dist/component-react.js" + "import": "./dist/component-react.module.js", + "require": "./dist/component-react.js" } }, - "files": ["dist/*"], + "files": ["dist/*", "react.js"], "repository": { "type": "git", "url": "https://github.com/ampproject/amphtml.git", diff --git a/extensions/amp-youtube/1.0/react.js b/extensions/amp-youtube/1.0/react.js new file mode 100644 index 000000000000..0b2957c35c38 --- /dev/null +++ b/extensions/amp-youtube/1.0/react.js @@ -0,0 +1,19 @@ +/** + * Copyright 2021 The AMP HTML Authors. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS-IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* eslint-env node */ +// eslint-disable-next-line local/no-module-exports +module.exports = require('./dist/component-react');