fix(app-vite&app-webpack): fix types feature flags #17429
Merged
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.
What kind of change does this PR introduce?
Does this PR introduce a breaking change?
The PR fulfills these requirements:
dev
branch (orv[X]
branch)fix: #xxx[,#xxx]
, where "xxx" is the issue number)Other information:
#17301 changes
moduleResolution
fromnode
tobundler
. That broke the feature flags system. Here is an example common error:It's because even though TS normally doesn't enforce the file extension inside the app code and imports from node_modules when using
bundler
, it does enforce it for wildcardpackage.json > exports
entries. So,quasar/dist/types/feature-flag
no longer works and must be changed toquasar/dist/types/feature-flag.d.ts
instead.Does not have to be backported to current stable releases of app-vite and app-webpack, as long as #17301 is not backported either.
This change will only apply to feature flags generated after the release of this. So, existing projects will only benefit from it when they add Pinia or build modes, OR delete the feature flag files and run
quasar dev
/quasar build
to re-generate them. New projects will work fine. So, we should add a notice to@quasar/app-vite-v2.0.0-beta.16
and@quasar/app-webpack-v4.0.0-beta.17
to notify them. We better also post an announcement about it. I recommend informing the users to delete the files, and then regenerate them by runningquasar dev
/quasar build
, instead of letting them update them individually. This will be easier to tell and less error-prone.Using
rimraf
throughnpx
(orpnpx
,yarn dlx
,bunx
)Unix-like (Linux, macOS):
Windows (CMD):
Windows (PowerShell):