File tree Expand file tree Collapse file tree 1 file changed +11
-13
lines changed Expand file tree Collapse file tree 1 file changed +11
-13
lines changed Original file line number Diff line number Diff line change @@ -7,23 +7,21 @@ export default defineConfig({
77 index : 'src/index.ts' ,
88 compat : 'src/compat/index.ts'
99 } ,
10- minify : 'terser' ,
11- terserOptions : {
12- mangle : {
13- properties : {
14- // Mangle class properties which start with an underscore.
15- regex : / ^ _ / ,
16- // Do not mangle '_meta', because this is part of our JSON
17- // data model.
18- reserved : [ '_meta' ] ,
19- } ,
20- } ,
21- } ,
10+ minify : true ,
2211 format : [ 'esm' , 'cjs' ] ,
2312 splitting : false ,
2413 sourcemap : false ,
2514 clean : true ,
2615 noExternal : [ '@launchdarkly/js-sdk-common' , '@launchdarkly/js-client-sdk-common' ] ,
27- treeshake : true ,
2816 dts : true ,
17+ metafile : true ,
18+ minifyIdentifiers : true ,
19+ esbuildOptions ( opts ) {
20+ // This would normally be `^_(?!meta|_)`, but go doesn't support negative look-ahead assertions,
21+ // so we need to craft something that works without it.
22+ // So start of line followed by a character that isn't followed by m or underscore, but we
23+ // want other things that do start with m, so we need to progressively handle more characters
24+ // of meta with exclusions.
25+ opts . mangleProps = / ^ _ ( [ ^ m | _ ] | m [ ^ e ] | m e [ ^ t ] | m e t [ ^ a ] ) / ;
26+ } ,
2927} ) ;
You can’t perform that action at this time.
0 commit comments