Skip to content

Commit 8c071b5

Browse files
feat(build): enhance code obfuscation in minification process
- Enable top-level symbol mangling - Add property name mangling with selective rules - Preserve 'parseTemplateString' function name and quoted properties This change increases code protection while maintaining the public API. The resulting minified file should be significantly smaller and harder to reverse-engineer, without affecting its functionality.
1 parent c079d75 commit 8c071b5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
run: |
2929
npx terser safe-template-parser.js \
3030
--compress passes=3,pure_getters=true,keep_fargs=false,unsafe=true,unsafe_comps=true,unsafe_math=true,unsafe_proto=true,unsafe_regexp=true,conditionals=true,evaluate=true,booleans=true,loops=true,unused=true,hoist_funs=true,keep_fargs=false,hoist_vars=true,if_return=true,join_vars=true,drop_console=true,drop_debugger=true,ecma=2015,toplevel=true \
31-
--mangle reserved=['parseTemplateString'] \
31+
--mangle reserved=['parseTemplateString'],toplevel=true,properties --mangle-props keep_quoted=true,regex=/^_/ \
3232
--output safe-template-parser.min.js
3333
3434
- name: Calculate file sizes

0 commit comments

Comments
 (0)