@verdnatura/vn-front-lib 0.0.12 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -14,6 +14,15 @@ it's built in library mode (Vite `build.lib`) and consumed as a dependency.
14
14
  `pinia`, `vue-i18n`, `axios`, `validator` and `quasar` are expected to be
15
15
  provided by the consuming project (declared as `peerDependencies`).
16
16
 
17
+ ### Importing from `quasar`
18
+
19
+ Always import `quasar` with a namespace import (`import * as quasar from 'quasar'`),
20
+ never a named import (`import { Notify } from 'quasar'`). `@quasar/vite-plugin`'s
21
+ auto-import rewrites named imports into deep `quasar/src/**` paths, which aren't
22
+ resolvable by consumers (quasar's `package.json` only exports `.`) and, if bundled
23
+ anyway, create a separate module instance from the one the consuming app installs —
24
+ breaking singletons like `Notify.create`/`useQuasar`'s injection.
25
+
17
26
  ## Recommended VS Code extension
18
27
 
19
28
  This project uses [oxlint](https://oxc.rs/docs/guide/usage/linter.html) and
@@ -45,28 +54,28 @@ deduped into a single instance across both projects:
45
54
  1. In the consuming project's `pnpm-workspace.yaml`, add this repo as a
46
55
  package:
47
56
 
48
- ```yaml
49
- packages:
50
- - .
51
- - ../vn-front-lib
52
- ```
57
+ ```yaml
58
+ packages:
59
+ - .
60
+ - ../vn-front-lib
61
+ ```
53
62
 
54
63
  2. In the consuming project's `package.json`, depend on it via the workspace
55
64
  protocol, using the real package name:
56
65
 
57
- ```json
58
- "@verdnatura/vn-front-lib": "workspace:@verdnatura/vn-front-lib@*",
59
- ```
66
+ ```json
67
+ "@verdnatura/vn-front-lib": "workspace:@verdnatura/vn-front-lib@*",
68
+ ```
60
69
 
61
70
  3. Enable the `vnSource` resolution condition in the consumer's Vite/Vitest
62
71
  config so imports resolve to this repo's `lib/` source instead of the
63
72
  `dist/` build:
64
73
 
65
- ```js
66
- resolve: {
67
- conditions: ['vnSource'],
68
- },
69
- ```
74
+ ```js
75
+ resolve: {
76
+ conditions: ['vnSource'],
77
+ },
78
+ ```
70
79
 
71
80
  4. Reinstall dependencies in the consuming project (`pnpm install`), then run
72
81
  `pnpm why vue -r` / `pnpm why pinia -r` to confirm only one version of