@dword-design/base-config-nuxt 5.0.7 → 5.0.9
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/dist/dev.js +1 -4
- package/dist/nuxt-wrapper.js +4 -7
- package/dist/nuxt.config.js +3 -39
- package/package.json +6 -8
package/dist/dev.js
CHANGED
|
@@ -8,9 +8,6 @@ export default ((options = {}) => {
|
|
|
8
8
|
...options
|
|
9
9
|
};
|
|
10
10
|
return execa(nuxtWrapper, ['dev'], {
|
|
11
|
-
[options.log ? 'stdio' : 'stderr']: 'inherit'
|
|
12
|
-
env: {
|
|
13
|
-
NODE_OPTIONS: '--require=suppress-experimental-warnings --require=@dword-design/suppress-babel-register-esm-warning --experimental-loader=babel-register-esm'
|
|
14
|
-
}
|
|
11
|
+
[options.log ? 'stdio' : 'stderr']: 'inherit'
|
|
15
12
|
});
|
|
16
13
|
});
|
package/dist/nuxt-wrapper.js
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import dotenv from '@dword-design/dotenv-json-extended';
|
|
3
3
|
import { execa } from 'execa';
|
|
4
|
-
const args = process.argv.slice(2);
|
|
5
4
|
dotenv.config();
|
|
6
|
-
execa('nuxt',
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
} : {}),
|
|
5
|
+
execa('nuxt-babel', process.argv.slice(2), {
|
|
6
|
+
env: {
|
|
7
|
+
NODE_ENV: ''
|
|
8
|
+
},
|
|
12
9
|
stdio: 'inherit'
|
|
13
10
|
});
|
package/dist/nuxt.config.js
CHANGED
|
@@ -1,14 +1,7 @@
|
|
|
1
|
-
import { transform } from '@babel/core';
|
|
2
|
-
import { babel as rollupPluginBabel } from '@rollup/plugin-babel';
|
|
3
|
-
import { parseVueRequest } from '@vitejs/plugin-vue';
|
|
4
|
-
import { parse } from '@vue/compiler-sfc';
|
|
5
1
|
import packageName from 'depcheck-package-name';
|
|
6
|
-
import
|
|
7
|
-
import vueSfcDescriptorToString from 'vue-sfc-descriptor-to-string';
|
|
2
|
+
import { createRequire } from 'module';
|
|
8
3
|
import config from "./config.js";
|
|
9
|
-
|
|
10
|
-
import localeLinkModule from "./modules/locale-link/index.js";
|
|
11
|
-
import svgModule from "./modules/svg.js";
|
|
4
|
+
const resolver = createRequire(import.meta.url);
|
|
12
5
|
const isBasicAuthEnabled = process.env.BASIC_AUTH_USER && process.env.BASIC_AUTH_PASSWORD;
|
|
13
6
|
export default {
|
|
14
7
|
app: {
|
|
@@ -44,16 +37,7 @@ export default {
|
|
|
44
37
|
failOnWarning: true,
|
|
45
38
|
fix: true,
|
|
46
39
|
lintOnStart: false
|
|
47
|
-
}],
|
|
48
|
-
// expressModule,
|
|
49
|
-
svgModule, localeLinkModule],
|
|
50
|
-
nitro: {
|
|
51
|
-
rollupConfig: {
|
|
52
|
-
plugins: [rollupPluginBabel({
|
|
53
|
-
babelHelpers: 'bundled'
|
|
54
|
-
})]
|
|
55
|
-
}
|
|
56
|
-
},
|
|
40
|
+
}], resolver.resolve('./modules/i18n.js'), resolver.resolve('./modules/locale-link/index.js'), resolver.resolve('./modules/svg.js')],
|
|
57
41
|
router: {
|
|
58
42
|
options: {
|
|
59
43
|
linkActiveClass: 'active'
|
|
@@ -73,26 +57,6 @@ export default {
|
|
|
73
57
|
})
|
|
74
58
|
},
|
|
75
59
|
vite: {
|
|
76
|
-
plugins: [{
|
|
77
|
-
enforce: 'pre',
|
|
78
|
-
transform: async (code, id) => {
|
|
79
|
-
const query = parseVueRequest(id);
|
|
80
|
-
if (query.filename.endsWith('.vue') && query.query.type !== 'style' && !query.filename.split('/').includes('node_modules')) {
|
|
81
|
-
const sfc = parse(code);
|
|
82
|
-
for (const section of ['scriptSetup', 'script']) {
|
|
83
|
-
if (sfc.descriptor[section] && sfc.descriptor[section].lang === undefined) {
|
|
84
|
-
sfc.descriptor[section].content = await transform(sfc.descriptor[section].content, {
|
|
85
|
-
plugins: [['@babel/plugin-proposal-pipeline-operator', {
|
|
86
|
-
proposal: 'fsharp'
|
|
87
|
-
}]]
|
|
88
|
-
}).code;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
return vueSfcDescriptorToString(sfc.descriptor);
|
|
92
|
-
}
|
|
93
|
-
return code;
|
|
94
|
-
}
|
|
95
|
-
}, vitePluginBabel()],
|
|
96
60
|
vue: {
|
|
97
61
|
template: {
|
|
98
62
|
transformAssetUrls: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dword-design/base-config-nuxt",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.9",
|
|
4
4
|
"repository": "dword-design/base-config-nuxt",
|
|
5
5
|
"funding": "https://github.com/sponsors/dword-design",
|
|
6
6
|
"license": "MIT",
|
|
@@ -25,8 +25,10 @@
|
|
|
25
25
|
"prepublishOnly": "base prepublishOnly",
|
|
26
26
|
"test": "base test"
|
|
27
27
|
},
|
|
28
|
+
"resolutions": {
|
|
29
|
+
"nuxi": "3.6.5"
|
|
30
|
+
},
|
|
28
31
|
"dependencies": {
|
|
29
|
-
"@babel/core": "^7.22.5",
|
|
30
32
|
"@dword-design/depcheck-parser-sass": "^4.0.0",
|
|
31
33
|
"@dword-design/dotenv-json-extended": "^2.0.0",
|
|
32
34
|
"@dword-design/functions": "^4.0.0",
|
|
@@ -36,9 +38,6 @@
|
|
|
36
38
|
"@nuxtjs/eslint-module": "^4.1.0",
|
|
37
39
|
"@nuxtjs/i18n": "npm:@dword-design/nuxt-i18n",
|
|
38
40
|
"@nuxtjs/stylelint-module": "^5.0.1",
|
|
39
|
-
"@rollup/plugin-babel": "^6.0.3",
|
|
40
|
-
"@vitejs/plugin-vue": "^4.2.3",
|
|
41
|
-
"@vue/compiler-sfc": "^3.3.4",
|
|
42
41
|
"deepmerge": "^4.3.1",
|
|
43
42
|
"depcheck-package-name": "^3.0.0",
|
|
44
43
|
"depcheck-parser-vue": "^4.0.7",
|
|
@@ -47,13 +46,12 @@
|
|
|
47
46
|
"globby": "^13.1.3",
|
|
48
47
|
"jiti": "^1.18.2",
|
|
49
48
|
"nuxt": "^3.2.3",
|
|
49
|
+
"nuxt-babel-runtime": "^4.0.0",
|
|
50
50
|
"nuxt-basic-authentication-module": "^0.2.1",
|
|
51
51
|
"output-files": "^2.0.0",
|
|
52
52
|
"require-package-name": "^2.0.1",
|
|
53
53
|
"stylelint": "^15.0.0",
|
|
54
|
-
"vite-
|
|
55
|
-
"vite-svg-loader": "^4.0.0",
|
|
56
|
-
"vue-sfc-descriptor-to-string": "npm:@dword-design/vue-sfc-descriptor-to-string"
|
|
54
|
+
"vite-svg-loader": "^4.0.0"
|
|
57
55
|
},
|
|
58
56
|
"devDependencies": {
|
|
59
57
|
"@dword-design/base": "^10.0.0",
|