feat(nuxt): supports automatic import of stores from extend layers
When I install pinia in a nuxt layer and create stores folder, and then I extend this layer in another nuxt application, I find that the stores are not automatically imported.
What this PR does:
When addImportsDir, consider the nuxt layers also.
Refer:
Deploy Preview for pinia-playground canceled.
| Name | Link |
|---|---|
| Latest commit | 3f4442f71dc5b67f0d1479ab81f09ea59e340ef0 |
| Latest deploy log | https://app.netlify.com/sites/pinia-playground/deploys/672fa0866fec6d00089bec54 |
Deploy Preview for pinia-official canceled.
| Name | Link |
|---|---|
| Latest commit | 3f4442f71dc5b67f0d1479ab81f09ea59e340ef0 |
| Latest deploy log | https://app.netlify.com/sites/pinia-official/deploys/672fa086672e41000862bf3b |
npm i https://pkg.pr.new/pinia@2828
npm i https://pkg.pr.new/@pinia/nuxt@2828
npm i https://pkg.pr.new/@pinia/testing@2828
commit: 3f4442f
I noticed there is also https://github.com/vuejs/pinia/pull/2757, so let's use that one instead. Thanks for the PR!
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 89.34%. Comparing base (6e90153) to head (3f4442f).
:warning: Report is 49 commits behind head on v2.
Additional details and impacted files
@@ Coverage Diff @@
## v2 #2828 +/- ##
=======================================
Coverage 89.34% 89.34%
=======================================
Files 14 14
Lines 1323 1323
Branches 218 219 +1
=======================================
Hits 1182 1182
Misses 140 140
Partials 1 1
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.