@alauda/doom 0.13.2 → 0.13.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/lib/utils/helpers.js +2 -2
- package/package.json +1 -1
package/lib/utils/helpers.js
CHANGED
|
@@ -22,9 +22,9 @@ export const resolveStaticConfig = async (filepath) => {
|
|
|
22
22
|
};
|
|
23
23
|
export async function generateRuntimeModule(patterns, kind, root, cwd, isProd, mapper) {
|
|
24
24
|
const runtimeModules = {};
|
|
25
|
-
const files = await glob(patterns, {
|
|
25
|
+
const files = await glob(patterns, { cwd });
|
|
26
26
|
for (const file of files) {
|
|
27
|
-
const result = await resolveStaticConfig(file);
|
|
27
|
+
const result = await resolveStaticConfig(path.resolve(cwd, file));
|
|
28
28
|
runtimeModules[`doom-@${kind}/${file}.mjs`] =
|
|
29
29
|
`export default ${JSON.stringify((await mapper?.(result)) ?? result, null, isProd ? 0 : 2)}`;
|
|
30
30
|
}
|