@dword-design/base-config-nuxt 5.0.1 → 5.0.3

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/index.js CHANGED
@@ -19,7 +19,7 @@ const __dirname = P.dirname(fileURLToPath(import.meta.url));
19
19
  const _require = createRequire(import.meta.url);
20
20
  const isInNodeModules = __dirname.split(P.sep).includes('node_modules');
21
21
  export default {
22
- allowedMatches: ['.stylelintrc.json', 'server/api/**/*.js', 'server/middleware/**/*.js', 'assets', 'components', 'content', 'i18n', 'layouts', 'middleware', 'model', 'modules', 'config.js', 'pages', 'plugins', 'public', 'store', 'types'],
22
+ allowedMatches: ['.stylelintrc.json', 'server/api/**/*.js', 'server/plugins/**/*.js', 'server/routes/**/*.js', 'server/middleware/**/*.js', 'assets', 'components', 'content', 'i18n', 'layouts', 'middleware', 'model', 'modules', 'config.js', 'pages', 'plugins', 'public', 'store', 'types'],
23
23
  commands: {
24
24
  analyze,
25
25
  dev,
@@ -75,12 +75,11 @@ export default {
75
75
  </script>\n
76
76
  `,
77
77
  'nuxt.config.js': javascript`
78
+ import deepmerge from '${packageName`deepmerge`}'
78
79
  import config from '${configPath}'
80
+ import parentConfig from '${parentConfigPath}'
79
81
 
80
- export default {
81
- extends: '${parentConfigPath}',
82
- ...config,
83
- }\n
82
+ export default deepmerge(parentConfig, config)\n
84
83
  `
85
84
  });
86
85
  },
@@ -1,10 +1,13 @@
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);
4
5
  dotenv.config();
5
- execa('nuxt', process.argv.slice(2), {
6
- env: {
7
- NODE_ENV: ''
8
- },
6
+ execa('nuxt', args, {
7
+ ...(args[0] === 'dev' ? {
8
+ env: {
9
+ NODE_ENV: 'development'
10
+ }
11
+ } : {}),
9
12
  stdio: 'inherit'
10
13
  });
@@ -6,7 +6,7 @@ import packageName from 'depcheck-package-name';
6
6
  import vueSfcDescriptorToString from 'vue-sfc-descriptor-to-string';
7
7
  import config from "./config.js";
8
8
  // import expressModule from './modules/express/index.js'
9
- import i18nModule from "./modules/i18n/index.js";
9
+ import i18nModule from "./modules/i18n.js";
10
10
  import localeLinkModule from "./modules/locale-link/index.js";
11
11
  import svgModule from "./modules/svg.js";
12
12
  const isBasicAuthEnabled = process.env.BASIC_AUTH_USER && process.env.BASIC_AUTH_PASSWORD;
@@ -27,7 +27,7 @@ export default {
27
27
  }] : [])]
28
28
  }
29
29
  },
30
- modules: [(otpoins, nuxt) => {
30
+ modules: [(options, nuxt) => {
31
31
  if (!config.userScalable) {
32
32
  const viewportMeta = nuxt.options.app.head.meta.find(meta => meta.name === 'viewport');
33
33
  viewportMeta.content += ', user-scalable=0';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dword-design/base-config-nuxt",
3
- "version": "5.0.1",
3
+ "version": "5.0.3",
4
4
  "repository": "dword-design/base-config-nuxt",
5
5
  "funding": "https://github.com/sponsors/dword-design",
6
6
  "license": "MIT",
@@ -39,6 +39,7 @@
39
39
  "@rollup/plugin-babel": "^6.0.3",
40
40
  "@vitejs/plugin-vue": "^4.2.3",
41
41
  "@vue/compiler-sfc": "^3.3.4",
42
+ "deepmerge": "^4.3.1",
42
43
  "depcheck-package-name": "^3.0.0",
43
44
  "depcheck-parser-vue": "^4.0.7",
44
45
  "execa": "^7.1.1",
File without changes