lgsso-sdk 1.0.7 → 1.0.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/package.json +1 -1
- package/rollup.config.js +12 -8
package/package.json
CHANGED
package/rollup.config.js
CHANGED
|
@@ -11,8 +11,10 @@ export default [
|
|
|
11
11
|
format: 'umd',
|
|
12
12
|
name: 'lgsso',
|
|
13
13
|
sourcemap: true,
|
|
14
|
-
//
|
|
15
|
-
interop: 'auto'
|
|
14
|
+
// 关键:避免UMD中生成require
|
|
15
|
+
interop: 'auto',
|
|
16
|
+
// 禁止生成CommonJS风格的导出
|
|
17
|
+
exports: 'named'
|
|
16
18
|
},
|
|
17
19
|
{
|
|
18
20
|
file: 'dist/lgsso-sdk.min.js',
|
|
@@ -20,7 +22,8 @@ export default [
|
|
|
20
22
|
name: 'lgsso',
|
|
21
23
|
sourcemap: true,
|
|
22
24
|
plugins: [terser()],
|
|
23
|
-
interop: 'auto'
|
|
25
|
+
interop: 'auto',
|
|
26
|
+
exports: 'named'
|
|
24
27
|
},
|
|
25
28
|
{
|
|
26
29
|
file: 'dist/lgsso-sdk.esm.js',
|
|
@@ -30,13 +33,14 @@ export default [
|
|
|
30
33
|
],
|
|
31
34
|
plugins: [
|
|
32
35
|
resolve({
|
|
33
|
-
//
|
|
34
|
-
|
|
35
|
-
browser: true
|
|
36
|
+
browser: true, // 只解析浏览器环境的依赖
|
|
37
|
+
preferBuiltins: false // 禁用Node.js内置模块
|
|
36
38
|
}),
|
|
37
39
|
commonjs({
|
|
38
|
-
//
|
|
39
|
-
transformMixedEsModules: true
|
|
40
|
+
// 强制转换所有CommonJS模块为ESM
|
|
41
|
+
transformMixedEsModules: true,
|
|
42
|
+
// 明确处理可能包含require的依赖
|
|
43
|
+
include: /node_modules/
|
|
40
44
|
})
|
|
41
45
|
]
|
|
42
46
|
}
|