From 66ae4e96ce53eae4641f3cd4d49a8aa111d73f52 Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Thu, 29 Sep 2022 16:54:49 +0000 Subject: [PATCH 1/9] refactor(vue): only ship es modules --- packages/vue/package.json | 1 - packages/vue/rollup.config.js | 10 ++-------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/packages/vue/package.json b/packages/vue/package.json index ff159aacda9..1a925266091 100644 --- a/packages/vue/package.json +++ b/packages/vue/package.json @@ -19,7 +19,6 @@ "sync": "sh ./scripts/sync.sh" }, "main": "./dist/index.js", - "module": "./dist/index.esm.js", "types": "./dist/types/index.d.ts", "files": [ "dist/", diff --git a/packages/vue/rollup.config.js b/packages/vue/rollup.config.js index cd8bdef5639..2df0de3501d 100644 --- a/packages/vue/rollup.config.js +++ b/packages/vue/rollup.config.js @@ -5,17 +5,11 @@ export default { output: [ { dir: 'dist/', - entryFileNames: '[name].esm.js', - chunkFileNames: '[name]-[hash].esm.js', + entryFileNames: '[name].js', + chunkFileNames: '[name]-[hash].js', format: 'es', sourcemap: true }, - { - dir: 'dist/', - format: 'commonjs', - preferConst: true, - sourcemap: true - } ], external: id => external.includes(id) || id.startsWith('@ionic/core') || id.startsWith('ionicons') }; From 7655ac91adf393bf277ec67ab2b2e553df60e471 Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Thu, 29 Sep 2022 16:58:26 +0000 Subject: [PATCH 2/9] chore(): update breaking --- BREAKING.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/BREAKING.md b/BREAKING.md index 8735baa9958..f75853bfd36 100644 --- a/BREAKING.md +++ b/BREAKING.md @@ -23,6 +23,8 @@ This is a comprehensive list of the breaking changes introduced in the major ver - [Slides](#version-7x-slides) - [Textarea](#version-7x-textarea) - [Virtual Scroll](#version-7x-virtual-scroll) +- [JavaScript Frameworks](#version-7x-javascript-frameworks) + - [Vue](#version-7x-vue) - [Utilities](#version-7x-utilities) - [hidden attribute](#version-7x-hidden-attribute) @@ -133,6 +135,12 @@ Developers using the component will need to migrate to a virtual scroll solution Any references to the virtual scroll types from `@ionic/core` have been removed. Please remove or replace these types: `Cell`, `VirtualNode`, `CellType`, `NodeChange`, `HeaderFn`, `ItemHeightFn`, `FooterHeightFn`, `ItemRenderFn` and `DomRenderFn`. +

JavaScript Frameworks

+ +

Vue

+ +`@ionic/vue` no longer ships a CommonJS entry point. Instead, only an ES Module entry point is provided for improved compatibility with Vite. Developers should not need to make any changes to their project. +

Utilities

`hidden` attribute

From b077d77afd1b1973f463cb54957d364a7069eab1 Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Thu, 29 Sep 2022 17:08:12 +0000 Subject: [PATCH 3/9] refactor(react): only ship es modules --- packages/react/package.json | 1 - packages/react/rollup.config.js | 12 +++--------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/packages/react/package.json b/packages/react/package.json index 7324159fa58..475135e0518 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -34,7 +34,6 @@ "sync": "sh ./scripts/sync.sh" }, "main": "dist/index.js", - "module": "dist/index.esm.js", "types": "dist/types/index.d.ts", "files": [ "dist/", diff --git a/packages/react/rollup.config.js b/packages/react/rollup.config.js index cb1bebe3104..1af9f78dc49 100644 --- a/packages/react/rollup.config.js +++ b/packages/react/rollup.config.js @@ -10,17 +10,11 @@ export default { output: [ { dir: 'dist/', - entryFileNames: '[name].esm.js', - chunkFileNames: '[name]-[hash].esm.js', + entryFileNames: '[name].js', + chunkFileNames: '[name]-[hash].js', format: 'es', sourcemap: true, - }, - { - dir: 'dist/', - format: 'commonjs', - preferConst: true, - sourcemap: true, - }, + } ], external: (id) => !/^(\.|\/)/.test(id), plugins: [ From 801ff98680d70eeef512ba2a80363e3d5806b5d0 Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Thu, 29 Sep 2022 17:10:01 +0000 Subject: [PATCH 4/9] chore(): apply fix to vue router too --- BREAKING.md | 2 +- packages/vue-router/package.json | 1 - packages/vue-router/rollup.config.js | 7 +------ 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/BREAKING.md b/BREAKING.md index f75853bfd36..4a18c6b534d 100644 --- a/BREAKING.md +++ b/BREAKING.md @@ -139,7 +139,7 @@ Any references to the virtual scroll types from `@ionic/core` have been removed.

Vue

-`@ionic/vue` no longer ships a CommonJS entry point. Instead, only an ES Module entry point is provided for improved compatibility with Vite. Developers should not need to make any changes to their project. +`@ionic/vue` and `@ionic/vue-router` no longer ships a CommonJS entry point. Instead, only an ES Module entry point is provided for improved compatibility with Vite. Developers should not need to make any changes to their project.

Utilities

diff --git a/packages/vue-router/package.json b/packages/vue-router/package.json index 616b27b2fa5..697b4c023b4 100644 --- a/packages/vue-router/package.json +++ b/packages/vue-router/package.json @@ -14,7 +14,6 @@ "sync": "sh ./scripts/sync.sh" }, "main": "./dist/index.js", - "module": "./dist/index.esm.js", "types": "./dist/types/index.d.ts", "files": [ "dist/" diff --git a/packages/vue-router/rollup.config.js b/packages/vue-router/rollup.config.js index 09277350f83..2114736e9ce 100644 --- a/packages/vue-router/rollup.config.js +++ b/packages/vue-router/rollup.config.js @@ -1,14 +1,9 @@ export default { input: 'dist-transpiled/index.js', output: [ - { - file: 'dist/index.esm.js', - format: 'es', - sourcemap: true, - }, { file: 'dist/index.js', - format: 'commonjs', + format: 'es', sourcemap: true, } ], From 5e2e69a652ea533467dce2ed602958cd0a0bb58a Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Thu, 29 Sep 2022 17:11:05 +0000 Subject: [PATCH 5/9] chore(): apply to react router too --- packages/react-router/package.json | 1 - packages/react-router/rollup.config.js | 9 ++------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/packages/react-router/package.json b/packages/react-router/package.json index 64a92236eec..d55b8481b17 100644 --- a/packages/react-router/package.json +++ b/packages/react-router/package.json @@ -31,7 +31,6 @@ "sync": "sh ./scripts/sync.sh" }, "main": "dist/index.js", - "module": "dist/index.esm.js", "types": "dist/types/index.d.ts", "files": [ "dist/" diff --git a/packages/react-router/rollup.config.js b/packages/react-router/rollup.config.js index be7afdd6795..639dffa80e9 100644 --- a/packages/react-router/rollup.config.js +++ b/packages/react-router/rollup.config.js @@ -4,16 +4,11 @@ import resolve from '@rollup/plugin-node-resolve'; export default { input: 'dist-transpiled/index.js', output: [ - { - file: 'dist/index.esm.js', - format: 'es', - sourcemap: true, - }, { file: 'dist/index.js', - format: 'commonjs', + format: 'es', sourcemap: true, - }, + } ], external: (id) => !/^(\.|\/)/.test(id), plugins: [resolve(), sourcemaps()], From 424c4e155f941aafd3add1dbd08b8149efaf4324 Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Thu, 29 Sep 2022 17:11:33 +0000 Subject: [PATCH 6/9] chore(): update breaking --- BREAKING.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/BREAKING.md b/BREAKING.md index 4a18c6b534d..c07335fafdc 100644 --- a/BREAKING.md +++ b/BREAKING.md @@ -24,6 +24,7 @@ This is a comprehensive list of the breaking changes introduced in the major ver - [Textarea](#version-7x-textarea) - [Virtual Scroll](#version-7x-virtual-scroll) - [JavaScript Frameworks](#version-7x-javascript-frameworks) + - [React](#version-7x-react) - [Vue](#version-7x-vue) - [Utilities](#version-7x-utilities) - [hidden attribute](#version-7x-hidden-attribute) @@ -137,6 +138,10 @@ Any references to the virtual scroll types from `@ionic/core` have been removed.

JavaScript Frameworks

+

React

+ +`@ionic/react` and `@ionic/react-router` no longer ships a CommonJS entry point. Instead, only an ES Module entry point is provided for improved compatibility with Vite. Developers should not need to make any changes to their project. +

Vue

`@ionic/vue` and `@ionic/vue-router` no longer ships a CommonJS entry point. Instead, only an ES Module entry point is provided for improved compatibility with Vite. Developers should not need to make any changes to their project. From dabbe83d58130b0ada3bdee9cf1c0a60b39d2af6 Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Thu, 29 Sep 2022 17:11:57 +0000 Subject: [PATCH 7/9] chore(): a letter --- BREAKING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BREAKING.md b/BREAKING.md index c07335fafdc..2e88a392d58 100644 --- a/BREAKING.md +++ b/BREAKING.md @@ -140,7 +140,7 @@ Any references to the virtual scroll types from `@ionic/core` have been removed.

React

-`@ionic/react` and `@ionic/react-router` no longer ships a CommonJS entry point. Instead, only an ES Module entry point is provided for improved compatibility with Vite. Developers should not need to make any changes to their project. +`@ionic/react` and `@ionic/react-router` no longer ship a CommonJS entry point. Instead, only an ES Module entry point is provided for improved compatibility with Vite. Developers should not need to make any changes to their project.

Vue

From 11b2cca9c72b0c8b5b262f6bf532ec307e0bec7b Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Thu, 29 Sep 2022 17:12:52 +0000 Subject: [PATCH 8/9] chore(): another letter --- BREAKING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BREAKING.md b/BREAKING.md index 2e88a392d58..28f331d5083 100644 --- a/BREAKING.md +++ b/BREAKING.md @@ -140,7 +140,7 @@ Any references to the virtual scroll types from `@ionic/core` have been removed.

React

-`@ionic/react` and `@ionic/react-router` no longer ship a CommonJS entry point. Instead, only an ES Module entry point is provided for improved compatibility with Vite. Developers should not need to make any changes to their project. +`@ionic/react` and `@ionic/react-router` no longer ship a CommonJS entry point. Instead, only an ES Module entry point is provided for improved compatibility with Vite. Developers should not need to make any changes to their projects.

Vue

From 1112f30d201e4ca05e084cc643bf6b566603a276 Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Fri, 30 Sep 2022 11:13:57 -0400 Subject: [PATCH 9/9] Update BREAKING.md --- BREAKING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BREAKING.md b/BREAKING.md index 28f331d5083..47bffe4c5e2 100644 --- a/BREAKING.md +++ b/BREAKING.md @@ -140,7 +140,7 @@ Any references to the virtual scroll types from `@ionic/core` have been removed.

React

-`@ionic/react` and `@ionic/react-router` no longer ship a CommonJS entry point. Instead, only an ES Module entry point is provided for improved compatibility with Vite. Developers should not need to make any changes to their projects. +`@ionic/react` and `@ionic/react-router` no longer ship a CommonJS entry point. Instead, only an ES Module entry point is provided for improved compatibility with Vite.

Vue