Expected volume reduction
linqunhe opened this issue · 3 comments
Happy to hear your ideas about what specifically would be changed and how this would be achieved. And I'd be happy to consider PRs.
Note that XRegExp is already split into a much smaller base script and a collection of addons. It's just that all the addons are bundled together with the base script for the npm package. Some of the Unicode addons are where almost all of the size comes from.
as your say
Use the following files in es mode
Line 20 in 2dcf16d
But add all addons to base script
Lines 10 to 15 in 2dcf16d
So it's impossible to tree shake.
Therefore, it should be used base script
import XRegExp from 'xregexp/src/xregexp'Due to the use of TS in the project.
Will report an error and cannot find the declaration file for the module "xregexp/src/xregexp".
Whether addons and base scripts should be exported?
Do you have some updated here?
