File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,17 @@ export default [
32
32
babel ( { exclude : "node_modules/**" } ) ,
33
33
builtins ( ) ,
34
34
terser ( )
35
- ]
35
+ ] ,
36
+ moduleContext : id => {
37
+ const thisAsWindowForModules = [
38
+ "node_modules/intl-messageformat/lib/core.js" ,
39
+ "node_modules/intl-messageformat/lib/compiler.js"
40
+ ]
41
+
42
+ if ( thisAsWindowForModules . some ( id_ => id . trimRight ( ) . endsWith ( id_ ) ) ) {
43
+ return "window"
44
+ }
45
+ }
36
46
} ,
37
47
{
38
48
input : "src/index.js" ,
@@ -56,6 +66,16 @@ export default [
56
66
commonjs ( ) ,
57
67
babel ( { exclude : "node_modules/**" } )
58
68
] ,
69
+ moduleContext : id => {
70
+ const thisAsWindowForModules = [
71
+ "node_modules/intl-messageformat/lib/core.js" ,
72
+ "node_modules/intl-messageformat/lib/compiler.js"
73
+ ]
74
+
75
+ if ( thisAsWindowForModules . some ( id_ => id . trimRight ( ) . endsWith ( id_ ) ) ) {
76
+ return "window"
77
+ }
78
+ } ,
59
79
output : [
60
80
{
61
81
dir : "dist/esm" ,
You can’t perform that action at this time.
0 commit comments