@alauda-fe/dynamic-plugin-sdk-rspack 0.0.1-alpha.5 → 0.0.1-alpha.7

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 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(configPath);
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
 
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "@alauda-fe/dynamic-plugin-sdk-rspack",
3
- "version": "0.0.1-alpha.5",
3
+ "version": "0.0.1-alpha.7",
4
4
  "type": "module",
5
5
  "main": "./index.js",
6
+ "types": "./src/index.d.ts",
6
7
  "sideEffects": false,
7
8
  "publishConfig": {
8
9
  "access": "public"