@@ -83,47 +83,48 @@ const baseConfig = {
8383 } ,
8484} ;
8585
86- const umd = merge ( { } , baseConfig , {
87- output : {
88- path : path . resolve ( __dirname , 'build/browser' ) ,
89- filename : 'filestack.umd.js' ,
90- library : 'filestack' ,
91- libraryTarget : 'umd' ,
92-
93- } ,
94- } ) ;
95-
96- const esm = merge ( { } , baseConfig , {
97- output : {
98- path : path . resolve ( __dirname , 'build/browser' ) ,
99- filename : 'filestack.esm.js' ,
100- library : {
101- type : 'module' ,
86+ const webpackConfigs = {
87+ umd : merge ( { } , baseConfig , {
88+ output : {
89+ path : path . resolve ( __dirname , 'build/browser' ) ,
90+ filename : 'filestack.umd.js' ,
91+ library : 'filestack' ,
92+ libraryTarget : 'umd' ,
10293 } ,
103- environment : {
94+ } ) ,
95+
96+ esm : merge ( { } , baseConfig , {
97+ output : {
98+ path : path . resolve ( __dirname , 'build/browser' ) ,
99+ filename : 'filestack.esm.js' ,
100+ library : {
101+ type : 'module' ,
102+ } ,
103+ environment : {
104+ module : true ,
105+ } ,
104106 module : true ,
105107 } ,
106- module : true ,
107- } ,
108- experiments : {
109- outputModule : true ,
110- } ,
111- } ) ;
108+ experiments : {
109+ outputModule : true ,
110+ } ,
111+ } ) ,
112112
113- const prod = merge ( { } , baseConfig , {
114- output : {
115- path : path . resolve ( __dirname , 'build/browser' ) ,
116- filename : 'filestack.min.js' ,
117- library : 'filestack' ,
118- libraryTarget : 'umd'
119- } ,
120- plugins : [
121- new WebpackAssetsManifest ( {
122- writeToDisk : true ,
123- integrity : true ,
124- output : 'manifest.json' ,
125- } ) ,
126- ] ,
127- } ) ;
113+ prod : merge ( { } , baseConfig , {
114+ output : {
115+ path : path . resolve ( __dirname , 'build/browser' ) ,
116+ filename : 'filestack.min.js' ,
117+ library : 'filestack' ,
118+ libraryTarget : 'umd'
119+ } ,
120+ plugins : [
121+ new WebpackAssetsManifest ( {
122+ writeToDisk : true ,
123+ integrity : true ,
124+ output : 'manifest.json' ,
125+ } ) ,
126+ ] ,
127+ } )
128+ } ;
128129
129- module . exports = [ umd , esm , prod ] ;
130+ module . exports = webpackConfigs ;
0 commit comments