@dword-design/base-config-nuxt 7.0.2 → 7.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.
@@ -1,4 +1,4 @@
1
1
  declare const _default: ({ cwd }: {
2
2
  cwd?: string | undefined;
3
- }) => (path: any) => any[];
3
+ }) => (path: any) => Promise<any[]>;
4
4
  export default _default;
@@ -3,12 +3,12 @@ import { createJiti } from "jiti";
3
3
  import requirePackageName from "require-package-name";
4
4
  export default ({
5
5
  cwd = "."
6
- }) => path => {
6
+ }) => async path => {
7
7
  if (pathLib.basename(path) === "config.ts") {
8
- const jitiInstance = createJiti(pathLib.resolve(cwd), {
9
- interopDefault: true
8
+ const jiti = createJiti(pathLib.resolve(cwd));
9
+ const config = await jiti.import("./config.ts", {
10
+ default: true
10
11
  });
11
- const config = jitiInstance("./config.ts");
12
12
  const modules = [...(config.modules || []), ...(config.buildModules || [])];
13
13
  return modules.map(mod => [mod].flat()[0]).filter(name => typeof name === "string").map(name => requirePackageName(name));
14
14
  }
package/dist/index.d.ts CHANGED
@@ -17,7 +17,7 @@ export default function (config: any): {
17
17
  '**/*.scss': any;
18
18
  '**/*.vue': any;
19
19
  };
20
- specials: ((path: any) => any[])[];
20
+ specials: ((path: any) => Promise<any[]>)[];
21
21
  };
22
22
  editorIgnore: string[];
23
23
  eslintConfig: any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dword-design/base-config-nuxt",
3
- "version": "7.0.2",
3
+ "version": "7.0.3",
4
4
  "repository": "dword-design/base-config-nuxt",
5
5
  "funding": "https://github.com/sponsors/dword-design",
6
6
  "license": "MIT",