@dargmuesli/nuxt-vio 3.6.0 → 3.7.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/composables/usePolyfills.ts +3 -3
- package/nuxt.config.ts +3 -3
- package/package.json +5 -5
- package/tailwind.config.ts +2 -11
- package/utils/constants.ts +12 -6
@@ -1,7 +1,7 @@
|
|
1
1
|
import { POLYFILLS } from '../utils/constants'
|
2
2
|
|
3
3
|
export const usePolyfills = () => {
|
4
|
-
const
|
4
|
+
const polyfillsUrl = `https://polyfill.io/v3/polyfill.min.js?features=${POLYFILLS.join(
|
5
5
|
'%2C',
|
6
6
|
)}&flags=gated`
|
7
7
|
|
@@ -10,7 +10,7 @@ export const usePolyfills = () => {
|
|
10
10
|
link: [
|
11
11
|
{
|
12
12
|
rel: 'preload',
|
13
|
-
href:
|
13
|
+
href: polyfillsUrl,
|
14
14
|
crossorigin: 'anonymous',
|
15
15
|
as: 'script',
|
16
16
|
'data-testid': 'polyfill-preload',
|
@@ -18,7 +18,7 @@ export const usePolyfills = () => {
|
|
18
18
|
],
|
19
19
|
script: [
|
20
20
|
{
|
21
|
-
src:
|
21
|
+
src: polyfillsUrl,
|
22
22
|
crossorigin: 'anonymous',
|
23
23
|
'data-testid': 'polyfill-script',
|
24
24
|
},
|
package/nuxt.config.ts
CHANGED
@@ -37,7 +37,7 @@ export default defineNuxtConfig(
|
|
37
37
|
devtools: {
|
38
38
|
enabled:
|
39
39
|
process.env.NODE_ENV !== 'production' &&
|
40
|
-
!process.env.
|
40
|
+
!process.env.NUXT_PUBLIC_VIO_IS_TESTING,
|
41
41
|
timeline: {
|
42
42
|
enabled: true,
|
43
43
|
},
|
@@ -58,7 +58,7 @@ export default defineNuxtConfig(
|
|
58
58
|
runtimeConfig: {
|
59
59
|
public: {
|
60
60
|
vio: {
|
61
|
-
googleAnalyticsId: '',
|
61
|
+
googleAnalyticsId: '',
|
62
62
|
isInProduction: process.env.NODE_ENV === 'production',
|
63
63
|
isTesting: false,
|
64
64
|
},
|
@@ -143,7 +143,6 @@ export default defineNuxtConfig(
|
|
143
143
|
logLevel: 'warning',
|
144
144
|
},
|
145
145
|
i18n: {
|
146
|
-
defaultLocale: 'en', // Must be set for the default prefix_except_default prefix strategy.
|
147
146
|
detectBrowserLanguage: {
|
148
147
|
cookieKey: I18N_COOKIE_NAME,
|
149
148
|
cookieSecure: true,
|
@@ -172,6 +171,7 @@ export default defineNuxtConfig(
|
|
172
171
|
},
|
173
172
|
VIO_NUXT_BASE_CONFIG({
|
174
173
|
baseUrl: BASE_URL,
|
174
|
+
defaultLocale: 'en',
|
175
175
|
siteName: SITE_NAME,
|
176
176
|
stagingHost: 'localhost:3000',
|
177
177
|
}),
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@dargmuesli/nuxt-vio",
|
3
|
-
"version": "3.
|
3
|
+
"version": "3.7.0",
|
4
4
|
"type": "module",
|
5
5
|
"publishConfig": {
|
6
6
|
"access": "public"
|
@@ -41,7 +41,7 @@
|
|
41
41
|
"prepare": "nuxt prepare .playground",
|
42
42
|
"preview": "nuxt preview .playground",
|
43
43
|
"start": "PORT=3001 node .playground/.output/server/index.mjs",
|
44
|
-
"test:e2e:dev": "cross-env
|
44
|
+
"test:e2e:dev": "cross-env NUXT_PUBLIC_VIO_IS_TESTING=1 pnpm test:e2e",
|
45
45
|
"test:e2e:docker:br": "pnpm test:e2e:docker:build && pnpm test:e2e:docker:run",
|
46
46
|
"test:e2e:docker:build": "docker build -t test-e2e_base --build-arg UID=$(id -u) --build-arg GID=$(id -g) --target test-e2e_base ..",
|
47
47
|
"test:e2e:docker:dev:update": "pnpm test:e2e:docker:dev --update-snapshots",
|
@@ -49,7 +49,7 @@
|
|
49
49
|
"test:e2e:docker:prod:update": "pnpm test:e2e:docker:prod --update-snapshots",
|
50
50
|
"test:e2e:docker:prod": "pnpm test:e2e:docker:br pnpm --dir src run test:e2e:prod",
|
51
51
|
"test:e2e:docker:run": "docker run --rm -v \"$PWD/..:/srv/app\" -v \"$(pnpm store path):/srv/.pnpm-store\" test-e2e_base",
|
52
|
-
"test:e2e:prod": "cross-env
|
52
|
+
"test:e2e:prod": "cross-env NUXT_PUBLIC_VIO_IS_TESTING=1 NODE_ENV=production pnpm test:e2e",
|
53
53
|
"test:e2e": "playwright test"
|
54
54
|
},
|
55
55
|
"dependencies": {
|
@@ -61,7 +61,7 @@
|
|
61
61
|
"@nuxtjs/html-validator": "1.5.2",
|
62
62
|
"@nuxtjs/i18n": "8.0.0-rc.4",
|
63
63
|
"@nuxtjs/tailwindcss": "6.8.0",
|
64
|
-
"@nuxtseo/module": "2.0.0-beta.
|
64
|
+
"@nuxtseo/module": "2.0.0-beta.27",
|
65
65
|
"@pinia/nuxt": "0.4.11",
|
66
66
|
"@playwright/test": "1.37.1",
|
67
67
|
"@tailwindcss/forms": "0.5.6",
|
@@ -90,7 +90,7 @@
|
|
90
90
|
"@intlify/eslint-plugin-vue-i18n": "3.0.0-next.3",
|
91
91
|
"@nuxtjs/eslint-config-typescript": "12.1.0",
|
92
92
|
"cross-env": "7.0.3",
|
93
|
-
"eslint": "8.
|
93
|
+
"eslint": "8.49.0",
|
94
94
|
"eslint-config-prettier": "9.0.0",
|
95
95
|
"eslint-plugin-compat": "4.2.0",
|
96
96
|
"eslint-plugin-nuxt": "4.0.0",
|
package/tailwind.config.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
+
import type { ModuleOptions } from '@nuxtjs/tailwindcss'
|
1
2
|
import formsPlugin from '@tailwindcss/forms'
|
2
3
|
import typographyPlugin from '@tailwindcss/typography'
|
3
|
-
import type { Config } from 'tailwindcss'
|
4
4
|
import colors from 'tailwindcss/colors'
|
5
5
|
import type { PluginAPI } from 'tailwindcss/types/config'
|
6
6
|
|
@@ -41,15 +41,6 @@ const prose = (theme: PluginAPI['theme']) => ({
|
|
41
41
|
})
|
42
42
|
|
43
43
|
export default {
|
44
|
-
content: [
|
45
|
-
'./components/**/*.{js,vue,ts}',
|
46
|
-
'./composables/**/*.{js,vue,ts}',
|
47
|
-
'./layouts/**/*.vue',
|
48
|
-
'./pages/**/*.vue',
|
49
|
-
'./plugins/**/*.{js,ts}',
|
50
|
-
// './nuxt.config.{js,ts}', // Does not work with i18n as of 2022-12-01
|
51
|
-
'./app.vue',
|
52
|
-
],
|
53
44
|
darkMode: 'class',
|
54
45
|
plugins: [
|
55
46
|
formsPlugin,
|
@@ -257,4 +248,4 @@ export default {
|
|
257
248
|
}),
|
258
249
|
},
|
259
250
|
},
|
260
|
-
} as
|
251
|
+
} as ModuleOptions['config']
|
package/utils/constants.ts
CHANGED
@@ -3,9 +3,9 @@ import { helpers } from '@vuelidate/validators'
|
|
3
3
|
export const SITE_NAME = 'Vio'
|
4
4
|
|
5
5
|
export const BASE_URL =
|
6
|
-
(process.env.
|
6
|
+
(process.env.NUXT_PUBLIC_HOST ? 'https' : 'http') +
|
7
7
|
'://' +
|
8
|
-
(process.env.
|
8
|
+
(process.env.NUXT_PUBLIC_HOST ||
|
9
9
|
`${process.env.HOST || 'localhost'}:${
|
10
10
|
!process.env.NODE_ENV || process.env.NODE_ENV === 'development'
|
11
11
|
? '3000'
|
@@ -33,7 +33,7 @@ export const I18N_MODULE_CONFIG = {
|
|
33
33
|
iso: 'de',
|
34
34
|
},
|
35
35
|
],
|
36
|
-
}
|
36
|
+
}
|
37
37
|
export const I18N_VUE_CONFIG = {
|
38
38
|
fallbackWarn: false, // covered by linting
|
39
39
|
missingWarn: false, // covered by linting
|
@@ -49,10 +49,12 @@ export const VALIDATION_SUGGESTION_TITLE_LENGTH_MAXIMUM = 300
|
|
49
49
|
export const VERIFICATION_FORMAT_UUID = helpers.regex(REGEX_UUID)
|
50
50
|
export const VIO_NUXT_BASE_CONFIG = ({
|
51
51
|
baseUrl,
|
52
|
+
defaultLocale,
|
52
53
|
siteName,
|
53
54
|
stagingHost,
|
54
55
|
}: {
|
55
56
|
baseUrl?: string
|
57
|
+
defaultLocale?: string
|
56
58
|
siteName: string
|
57
59
|
stagingHost?: string
|
58
60
|
}) =>
|
@@ -72,7 +74,7 @@ export const VIO_NUXT_BASE_CONFIG = ({
|
|
72
74
|
? {
|
73
75
|
stagingHost:
|
74
76
|
process.env.NODE_ENV !== 'production' &&
|
75
|
-
!process.env.
|
77
|
+
!process.env.NUXT_PUBLIC_HOST
|
76
78
|
? stagingHost
|
77
79
|
: undefined,
|
78
80
|
}
|
@@ -82,9 +84,13 @@ export const VIO_NUXT_BASE_CONFIG = ({
|
|
82
84
|
},
|
83
85
|
|
84
86
|
// modules
|
85
|
-
i18n:
|
87
|
+
i18n: {
|
88
|
+
defaultLocale, // Must be set for the default prefix_except_default prefix strategy.
|
89
|
+
...I18N_MODULE_CONFIG, // `langDir`, `lazy` and `locales` must be configured to extend a layer having lazy-loaded translations (https://v8.i18n.nuxtjs.org/guide/layers#locales)
|
90
|
+
},
|
86
91
|
site: {
|
87
|
-
name: siteName,
|
88
92
|
...(baseUrl ? { url: baseUrl } : {}),
|
93
|
+
...(defaultLocale ? { defaultLocale } : {}),
|
94
|
+
name: siteName,
|
89
95
|
},
|
90
96
|
}) as Parameters<typeof defineNuxtConfig>[0]
|