@@ -77,19 +77,83 @@ export default [
7777 external : [ 'tslib' ] ,
7878 plugins,
7979 } ,
80- Object . assign ( { } , bundleConfig , {
81- output : Object . assign ( { } , bundleConfig . output , {
80+ {
81+ ...bundleConfig ,
82+ output : {
83+ ...bundleConfig . output ,
8284 file : 'build/bundle.js' ,
83- } ) ,
84- } ) ,
85- Object . assign ( { } , bundleConfig , {
86- output : Object . assign ( { } , bundleConfig . output , {
85+ } ,
86+ } ,
87+ {
88+ ...bundleConfig ,
89+ output : {
90+ ...bundleConfig . output ,
8791 file : 'build/bundle.min.js' ,
88- } ) ,
92+ } ,
8993 // Uglify has to be at the end of compilation, BUT before the license banner
9094 plugins : bundleConfig . plugins
9195 . slice ( 0 , - 1 )
9296 . concat ( terserInstance )
9397 . concat ( bundleConfig . plugins . slice ( - 1 ) ) ,
94- } ) ,
98+ } ,
99+ {
100+ ...bundleConfig ,
101+ output : {
102+ ...bundleConfig . output ,
103+ file : 'build/bundle.es6.js' ,
104+ } ,
105+ plugins : [
106+ typescript ( {
107+ tsconfig : 'tsconfig.build.json' ,
108+ tsconfigOverride : {
109+ compilerOptions : {
110+ declaration : false ,
111+ module : 'ES2015' ,
112+ paths : {
113+ '@sentry/utils/*' : [ '../utils/src/*' ] ,
114+ '@sentry/core' : [ '../core/src' ] ,
115+ '@sentry/hub' : [ '../hub/src' ] ,
116+ '@sentry/types' : [ '../types/src' ] ,
117+ '@sentry/minimal' : [ '../minimal/src' ] ,
118+ } ,
119+ target : 'es6' ,
120+ } ,
121+ } ,
122+ include : [ '*.ts+(|x)' , '**/*.ts+(|x)' , '../**/*.ts+(|x)' ] ,
123+ } ) ,
124+ ...plugins . slice ( 1 ) ,
125+ ] ,
126+ } ,
127+ {
128+ ...bundleConfig ,
129+ output : {
130+ ...bundleConfig . output ,
131+ file : 'build/bundle.es6.min.js' ,
132+ } ,
133+ plugins : [
134+ typescript ( {
135+ tsconfig : 'tsconfig.build.json' ,
136+ tsconfigOverride : {
137+ compilerOptions : {
138+ declaration : false ,
139+ module : 'ES2015' ,
140+ paths : {
141+ '@sentry/utils/*' : [ '../utils/src/*' ] ,
142+ '@sentry/core' : [ '../core/src' ] ,
143+ '@sentry/hub' : [ '../hub/src' ] ,
144+ '@sentry/types' : [ '../types/src' ] ,
145+ '@sentry/minimal' : [ '../minimal/src' ] ,
146+ } ,
147+ target : 'es6' ,
148+ } ,
149+ } ,
150+ include : [ '*.ts+(|x)' , '**/*.ts+(|x)' , '../**/*.ts+(|x)' ] ,
151+ } ) ,
152+ ...plugins
153+ . slice ( 1 )
154+ . slice ( 0 , - 1 )
155+ . concat ( terserInstance )
156+ . concat ( bundleConfig . plugins . slice ( - 1 ) ) ,
157+ ] ,
158+ } ,
95159] ;
0 commit comments