Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue number: resolves internal
What is the current behavior?
The Ionic Framework packages each carried their own independent TypeScript configuration, and only
@ionic/angular-serverextended from the roottsconfig.json. As a result the settings had drifted apart across packages:moduleResolutionused the classicnoderesolver in several packages.libwas pinned toes2017(and other mixed values).modulewas set to older values such ases2015in places.targetranged fromes2015toes2020depending on the package.This made the setup harder to maintain and kept the framework on older TypeScript defaults.
What is the new behavior?
Modernizes the TypeScript setup so every package shares a single root configuration and modern compiler options.
core/tsconfig.base.json, and every package extends it, keeping only package specific overrides locally. It lives incore/rather than at the repo root because core is the only package present in every build context, including the Vercel preview which builds core in isolation. Since every package already depends on core, the base is reachable everywhere without any per environment workarounds.@ionic/*path aliases from the old root config. Three of them pointed at directories that no longer exist since the packages moved underpackages/.moduleResolutionupdated fromnodetobundler.libupdated toes2022.moduleupdated toesnext.targetupdated toes2022.6.xacross the packages to align with@ionic/angular.Changes that followed from the above:
@ionic/reactdeclareto the inheritedcontextclass fields, required by thees2022useDefineForClassFieldsdefault.tsconfig.spec.jsonwithisolatedModulessots-jestruns under TypeScript 6.@ionic/react-routerdeclareto the inheritedcontextclass field, required by thees2022useDefineForClassFieldsdefault (the same change made in@ionic/react).rootDirso@rollup/plugin-typescriptcan determine the output file layout, which resolves the TS5011 advisory it otherwise emits.@ionic/vuerootDirwas intentionally not added. It surfaces a set of pre-existing type errors, which are deferred to a dedicated PR so this one stays focused on the setup.@ionic/vue-routerrootDirdeferred for the same reason as@ionic/vue.@ionic/angulartscscript, since the build already type checks like the other packages.scripts/rollup.config.js,scripts/rollup.config.legacy.js,scripts/package.json). These date back to the manualtscplus rollup plus gulp pipeline Ionic used before migrating to ng-packagr around Angular 9, for Angular versions no longer supported (this branch supports Angular 18 and above).outDir, which existed to hold thetscoutput that the pre-ng-packagr pipeline bundled from. ng-packagr manages its own output, so it no longer serves a purpose.Does this introduce a breaking change?
The compiled output now targets
es2022(previouslyes2015/es2017), and building the framework requires TypeScript6.x. Consuming applications should be on a toolchain that supportses2022output.Other information