-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
about tree-shaking #4488
Copy link
Copy link
Closed
Description
// base.js
const str1 = "1111";
const str2 = "2222".trim();
const str3 = `3333`;
const str4 = `4444`.trim();
const $ = window.$ || unsafeWindow.$;
export { str1, str2, str3, str4, $ };// main.js
import { str1, str2, str3, str4, $ } from "./base";
console.log(str1);bundle:
(function () {
'use strict';
// base.js
const str1 = "1111";
`4444` .trim();
window.$ || unsafeWindow.$;
// main.js
console.log(str1);
})();如何不输出「4444 .trim();」和 window.$ || unsafeWindow.$;两行?
How to not output 「4444 .trim();」and window.$ || unsafeWindow.$;?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels