@alauda-fe/dynamic-plugin-sdk-rspack 0.0.1-alpha.5 → 0.0.1-alpha.6
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/i18n-merge.js +5 -1
- package/package.json +1 -1
package/lib/i18n-merge.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import fs from 'node:fs';
|
|
4
4
|
import path from 'node:path';
|
|
5
|
+
import { pathToFileURL } from 'node:url';
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* @param {string[]} argv
|
|
@@ -127,7 +128,10 @@ async function run() {
|
|
|
127
128
|
throw new Error(`Config file not found: ${configPath}`);
|
|
128
129
|
}
|
|
129
130
|
|
|
130
|
-
const config = await import(
|
|
131
|
+
const config = await import(
|
|
132
|
+
pathToFileURL(configPath),
|
|
133
|
+
configPath.endsWith('.json') ? { with: { type: 'json' } } : undefined
|
|
134
|
+
).then(mod => mod.default || mod);
|
|
131
135
|
const inputs = config?.input;
|
|
132
136
|
const output = config?.output;
|
|
133
137
|
|