@cooperco/nuxt-layer-base 1.1.1 → 1.2.1
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 +23 -1
- package/nuxt.config.ts +2 -2
- package/package.json +11 -10
package/README.md
CHANGED
|
@@ -19,6 +19,7 @@ Learn more in the official Nuxt Layers documentation: https://nuxt.com/docs/guid
|
|
|
19
19
|
- TypeScript with strict mode enabled
|
|
20
20
|
- ESLint via `@nuxt/eslint` with stylistic Vue template rules
|
|
21
21
|
- Internationalization (i18n) via `@nuxtjs/i18n`
|
|
22
|
+
- Hints and best practices via `@nuxt/hints`
|
|
22
23
|
- Nuxt DevTools enabled in development
|
|
23
24
|
- Optional error and event logging to Loggly (client and server), disabled by default
|
|
24
25
|
|
|
@@ -46,7 +47,7 @@ export default defineNuxtConfig({
|
|
|
46
47
|
})
|
|
47
48
|
```
|
|
48
49
|
|
|
49
|
-
TypeScript strict mode and DevTools are active immediately. For ESLint, add a config in your app (see "ESLint in consumer apps").
|
|
50
|
+
TypeScript strict mode and DevTools are active immediately. For ESLint, add a config in your app (see "ESLint in consumer apps"). For `@nuxt/hints`, you must also install it as a dev dependency in your app (see "Hints and Best Practices (@nuxt/hints)").
|
|
50
51
|
|
|
51
52
|
### Internationalization (i18n)
|
|
52
53
|
|
|
@@ -94,6 +95,27 @@ const { t } = useI18n()
|
|
|
94
95
|
|
|
95
96
|
Both global files (e.g., `locales/en.json`) and per‑component `<i18n>` blocks are supported.
|
|
96
97
|
|
|
98
|
+
### Hints and Best Practices (@nuxt/hints)
|
|
99
|
+
|
|
100
|
+
This layer includes `@nuxt/hints`, which provides real-time suggestions for improving your application's performance, security, and best practices directly in your development environment.
|
|
101
|
+
|
|
102
|
+
#### Important: Runtime Dependency
|
|
103
|
+
|
|
104
|
+
Because `@nuxt/hints` injects runtime code into your components (to track hydration and other metrics), you **must** add `@nuxt/hints` to your app's `devDependencies` even though it is provided by the layer. This ensures that the bundler can resolve the injected imports.
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
# npm
|
|
108
|
+
npm i -D @nuxt/hints
|
|
109
|
+
|
|
110
|
+
# pnpm
|
|
111
|
+
pnpm add -D @nuxt/hints
|
|
112
|
+
|
|
113
|
+
# yarn
|
|
114
|
+
yarn add -D @nuxt/hints
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
*Note: If you are using a monorepo with workspaces (e.g., pnpm workspaces) where dependencies are hoisted to the root, this manual installation may not be necessary.*
|
|
118
|
+
|
|
97
119
|
### Logging (optional, Loggly‑backed)
|
|
98
120
|
|
|
99
121
|
When enabled via environment variables, the base layer will:
|
package/nuxt.config.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* eslint-disable nuxt/nuxt-config-keys-order */
|
|
2
2
|
export default defineNuxtConfig({
|
|
3
|
-
modules: ['@nuxt/eslint', '@nuxtjs/i18n'],
|
|
3
|
+
modules: ['@nuxt/eslint', '@nuxtjs/i18n', '@nuxt/hints'],
|
|
4
4
|
devtools: { enabled: true },
|
|
5
5
|
compatibilityDate: '2025-07-15',
|
|
6
6
|
|
|
@@ -36,4 +36,4 @@ export default defineNuxtConfig({
|
|
|
36
36
|
defaultLocale: 'en'
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
})
|
|
39
|
+
})
|
package/package.json
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cooperco/nuxt-layer-base",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./nuxt.config.ts",
|
|
6
|
+
"author": "cooperco",
|
|
7
|
+
"description": "Base Nuxt layer for cooperco projects",
|
|
8
|
+
"license": "MIT",
|
|
6
9
|
"scripts": {
|
|
7
10
|
"dev": "nuxt dev",
|
|
8
|
-
"lint": "
|
|
9
|
-
"lint:fix": "
|
|
10
|
-
"typecheck": "nuxt
|
|
11
|
+
"lint": "eslint .",
|
|
12
|
+
"lint:fix": "eslint . --fix",
|
|
13
|
+
"typecheck": "nuxt typecheck"
|
|
11
14
|
},
|
|
12
|
-
"description": "Base Nuxt layer for cooperco projects",
|
|
13
15
|
"publishConfig": {
|
|
14
16
|
"access": "public",
|
|
15
17
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -19,16 +21,15 @@
|
|
|
19
21
|
"url": "git+https://github.com/Cryobank/nuxt-layers.git",
|
|
20
22
|
"directory": "layers/base"
|
|
21
23
|
},
|
|
22
|
-
"author": "cooperco",
|
|
23
|
-
"license": "MIT",
|
|
24
24
|
"dependencies": {
|
|
25
|
+
"@nuxt/hints": "^1.0.0-alpha.5",
|
|
25
26
|
"@nuxtjs/i18n": "^10.2.1",
|
|
26
27
|
"nuxt": "^4.2.2"
|
|
27
28
|
},
|
|
28
29
|
"devDependencies": {
|
|
29
|
-
"@nuxt/eslint": "^1.
|
|
30
|
-
"@nuxt/test-utils": "^3.
|
|
30
|
+
"@nuxt/eslint": "^1.12.1",
|
|
31
|
+
"@nuxt/test-utils": "^3.23.0",
|
|
31
32
|
"eslint": "^9.39.2",
|
|
32
|
-
"vue-tsc": "^3.
|
|
33
|
+
"vue-tsc": "^3.2.2"
|
|
33
34
|
}
|
|
34
35
|
}
|