Skip to content

Commit

Permalink
Merge branch 'main' into rlamb/sdk-566/add-inspector-support
Browse files Browse the repository at this point in the history
  • Loading branch information
kinyoklion authored Oct 11, 2024
2 parents 8c8a83b + f6fc40b commit be6d374
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions packages/sdk/browser/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,18 @@ const getSharedConfig = (format, file) => ({
},
});

const terserOpts = {
mangle: {
properties: {
// Mangle class properties which start with an underscore.
regex: /^_/,
// Do not mangle '_meta', because this is part of our JSON
// data model.
reserved: ['_meta']
},
}
};

export default [
{
...getSharedConfig('es', 'dist/index.es.js'),
Expand All @@ -33,13 +45,7 @@ export default [
esmExternals: true,
}),
resolve(),
terser({
mangle: {
properties: {
regex: /^_/,
},
},
}),
terser(terserOpts),
json(),
// The 'sourcemap' option allows using the minified size, not the size before minification.
visualizer({ sourcemap: true }),
Expand All @@ -51,13 +57,7 @@ export default [
typescript(),
common(),
resolve(),
terser({
mangle: {
properties: {
regex: /^_/,
},
},
}),
terser(terserOpts),
json(),
],
},
Expand Down

0 comments on commit be6d374

Please sign in to comment.