@dword-design/base-config-nuxt 7.0.1 → 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.
|
@@ -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
|
|
9
|
-
|
|
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
package/dist/index.js
CHANGED
|
@@ -20,7 +20,7 @@ const resolver = createRequire(import.meta.url);
|
|
|
20
20
|
const isInNodeModules = __dirname.split(P.sep).includes("node_modules");
|
|
21
21
|
export default function (config) {
|
|
22
22
|
return {
|
|
23
|
-
allowedMatches: [".stylelintrc.json", "server/api/**/*.ts", "server/plugins/**/*.ts", "server/routes/**/*.ts", "server/middleware/**/*.ts", "app.vue", "assets", "components", "composables", "content", "i18n", "layouts", "middleware", "model", "modules", "config.ts", "pages", "plugins", "public", "store", "types"],
|
|
23
|
+
allowedMatches: [".stylelintignore", ".stylelintrc.json", "server/api/**/*.ts", "server/plugins/**/*.ts", "server/routes/**/*.ts", "server/middleware/**/*.ts", "app.vue", "assets", "components", "composables", "content", "i18n", "layouts", "middleware", "model", "modules", "config.ts", "pages", "plugins", "public", "store", "types"],
|
|
24
24
|
commands: {
|
|
25
25
|
analyze,
|
|
26
26
|
build,
|