@dword-design/base-config-nuxt 3.2.7 → 3.2.8
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/depcheck-special.js +15 -19
- package/package.json +1 -1
package/dist/depcheck-special.js
CHANGED
|
@@ -5,25 +5,21 @@ import map from "@dword-design/functions/dist/map.js";
|
|
|
5
5
|
import jiti from 'jiti';
|
|
6
6
|
import P from 'path';
|
|
7
7
|
export default (path => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
})(_modules)), filter(name => typeof name === 'string')(_ref);
|
|
24
|
-
}
|
|
25
|
-
} catch (error) {
|
|
26
|
-
console.log(error);
|
|
8
|
+
if (P.basename(path) === 'nuxt.config.js') {
|
|
9
|
+
var _ref, _modules;
|
|
10
|
+
const jitiInstance = jiti(process.cwd(), {
|
|
11
|
+
esmResolve: true,
|
|
12
|
+
interopDefault: true,
|
|
13
|
+
transformOptions: {
|
|
14
|
+
babel: babelConfig
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
const config = jitiInstance(`./nuxt.config.js`);
|
|
18
|
+
const modules = [...(config.modules || []), ...(config.buildModules || [])];
|
|
19
|
+
return _ref = (_modules = modules, map(mod => {
|
|
20
|
+
var _concat;
|
|
21
|
+
return _concat = [].concat(mod), first(_concat);
|
|
22
|
+
})(_modules)), filter(name => typeof name === 'string')(_ref);
|
|
27
23
|
}
|
|
28
24
|
return [];
|
|
29
25
|
});
|