Commit Graph

60 Commits

Author SHA1 Message Date
HeYunfei
a1ccc8afdf
feat(es/minifier): Make name mangler understand block scoping (#6670)
**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/5090.
 - Closes https://github.com/swc-project/swc/issues/5766.
2023-01-06 03:14:10 +00:00
Alexander Akait
4d7b920bd4
feat(es/minifier): Support script fully (#6455) 2022-11-17 06:00:42 +00:00
Alexander Akait
a923e52d8f
fix(html/minifier): Fix merging of scripts (#6393) 2022-11-11 08:47:05 +00:00
Alexander Akait
34b3710c9c
feat(html/minifier): Improve merging of group elements (#6349) 2022-11-07 14:26:08 +00:00
Alexander Akait
02f8d31ef3
feat(html/minifier): Merge script tags (#6273) 2022-10-28 02:39:10 +00:00
Alexander Akait
028951c36c
fix(html/minifier): Merge style blocks (#6264) 2022-10-27 02:25:45 +00:00
Alexander Akait
782da5c83a
feat(html/minifier): Handle crossorigin (#6261) 2022-10-27 00:16:24 +00:00
Donny/강동윤
86e265a024
feat(es/minifier): Support more statements in seqential inliner (#6248)
**Description:**

We now inline into the discriminant of a switch statement and into the initializer of for/for-in/for-of statements.
2022-10-26 13:37:10 +09:00
Alexander Akait
aa3fab1957
feat(html/minifier): Improve removal of redundant attributes (#6197) 2022-10-20 04:17:17 +00:00
Alexander Akait
0ba464d643
fix(html/minifier): Compress exportparts (#6187) 2022-10-18 14:48:47 +00:00
Alexander Akait
8f00d1a934
feat(html/minifier): Compress javascript: URLs (#6185) 2022-10-18 14:15:43 +00:00
Alexander Akait
41093b022d
feat(html/minifier): Merge identical metadata elements (#6183) 2022-10-18 13:40:59 +00:00
Alexander Akait
5571c0c202
fix(html/minifier): Avoid ; at the end of js (#6188) 2022-10-18 01:07:15 +00:00
Donny/강동윤
7bcaaef4f7
feat(es/minifier): Mangle labels (#5934)
**Description:**

This PR adds code to mangle labels.
2022-09-22 23:24:05 +09:00
Donny/강동윤
537449e53b
fix(es/codegen): Emit trailing semicolon (#5659) 2022-08-29 10:10:55 +00:00
Alexander Akait
3cb6fc2a29
feat(html/minifier): Improve minification modes (#5568) 2022-08-20 04:04:47 +00:00
Alexander Akait
4f55459b01
fix(html/minifier): Don't break unknown attributes (#5256) 2022-07-20 07:23:58 +00:00
Alexander Akait
625fc18da0
feat(html/minifier): Compress more default attributes (#5182) 2022-07-15 10:55:24 +00:00
Alexander Akait
f813a60497
feat(html/minifier): Sort attributes (#4784) 2022-07-06 15:50:23 +00:00
Alexander Akait
26cfeff79c
feat(html/minifier): Sort unordered values in attributes (#5035) 2022-06-30 01:46:24 +00:00
Alexander Akait
37eb366a1f
feat(es/parser): Add allow_return_outside_function to options (#5046) 2022-06-29 11:02:05 +00:00
Alexander Akait
d7a5f71073
feat(html/minifier): Allow minifying custom script contents (#5043) 2022-06-28 11:26:00 +00:00
Alexander Akait
0836d29913
feat(html/minifier): Add normalize_attributes for disabling normalization (#5045) 2022-06-28 04:37:04 +00:00
Alexander Akait
55e0ea3294
feat(html/minifier): Allow compressing additional attributes (#5036) 2022-06-27 21:37:48 +09:00
Alexander Akait
9202ff9700
feat(html/minifier): Improve smart mode (#5004) 2022-06-26 19:08:03 +00:00
Alexander Akait
47d34a33d4
feat(html/minifier): Compress style and media attributes (#5022) 2022-06-23 03:29:00 +00:00
Alexander Akait
03d8a3a0dd
feat(html/minifier): Add remove_redundant_attributes (#5023) 2022-06-22 05:54:25 +00:00
Alexander Akait
c61babd9af
fix(html/minifier): Compress more complex attributes (#5024) 2022-06-22 04:55:35 +00:00
Alexander Akait
f1fd83dcc7
fix(html/minifier): Avoid optional attributes (#5016) 2022-06-21 15:34:16 +00:00
Alexander Akait
28bc735d03
feat(html/minifier): Minify js (#4999) 2022-06-21 14:28:53 +00:00
Alexander Akait
1538649237
feat(html/minifier): Compress more svg/mathml attributes (#5001) 2022-06-20 12:25:43 +00:00
Alexander Akait
3e6c0f567a
feat(html/minifier): Compress CSS (#4973) 2022-06-15 04:04:57 +00:00
Alexander Akait
3957bc64b7
feat(html/minifier): Add collapse_boolean_attributes option (#4960) 2022-06-14 05:38:50 +00:00
Alexander Akait
63d630d477
feat(html/minifier): Add remove_empty_attributes option (#4958) 2022-06-13 19:52:35 +00:00
Alexander Akait
f157aae40c
feat(html/codegen): Minify svg attributes (#4917) 2022-06-10 09:14:40 +00:00
Alexander Akait
da09c1ca5b
feat(html/codegen): Improve entity compression (#4889) 2022-06-07 04:33:33 +00:00
Alexander Akait
6e0f5f1c48
feat(html/minifier): Remove spaces between nodes (#4880) 2022-06-04 17:51:36 +00:00
Alexander Akait
c5df1a3a54
feat(html/minifier): Improve compression of attributes (#4849) 2022-06-01 00:07:19 +00:00
Alexander Akait
e6ae299776
feat(html/minifier): Compress viewport meta (#4844) 2022-05-30 07:07:52 +00:00
Alexander Akait
c9d0e37ab9
fix(html/codegen): Remove optional html start tag (#4811) 2022-05-27 14:45:18 +00:00
Alexander Akait
c35cb598f7
fix(html/minifier): Avoid removing id with spaces (#4786) 2022-05-26 06:13:39 +00:00
Alexander Akait
c6ec9f9cf2
feat(html/codegen): Omit start and end tags if it is possible (#4780) 2022-05-25 16:48:33 +00:00
Alexander Akait
11aa6bee9e
feat(html/minifier): Sort classes (#4783) 2022-05-25 03:02:27 +00:00
Alexander Akait
b5e481c114
feat(html/minifier): Improve script type compression (#4785) 2022-05-25 02:35:43 +00:00
Alexander Akait
cac8cee62a
feat(html/minifier): Compress characters in head (#4682) 2022-05-19 01:15:40 +00:00
Alexander Akait
1f945b9277
fix(html/parser): Fix error reporting (#4644) 2022-05-14 01:43:52 +00:00
Alexander Akait
5679b69600
feat(html/minifier): Improve minification of attributes (#4625) 2022-05-12 04:40:47 +00:00
Alexander Akait
79090e1b2a
fix(html/parser): Fix parsing of comments in textarea (#4530) 2022-05-05 03:13:20 +00:00
Alexander Akait
fca84eb0f2
fix(html/parser): Fix bugs (#4502) 2022-05-03 02:49:06 +00:00
Alexander Akait
750d6551fc
feat(html/minifier): Remove duplicate attributes (#4474) 2022-04-29 05:28:55 +00:00