-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7b0e0ff
commit 865c3c5
Showing
5 changed files
with
28 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
module.exports = { | ||
solo: true, | ||
description: 'allows to manually declare functions as pure by name', | ||
options: { | ||
treeshake: { manualPureFunctions: ['foo', 'bar.baz'] } | ||
treeshake: { manualPureFunctions: ['foo', 'bar.a'] } | ||
} | ||
}; | ||
// TODO Lukas also tagged templates | ||
// TODO Lukas also check "this" or arguments are not deoptimized |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,11 @@ | ||
const lib = () => console.log(); | ||
lib.baz = console.log; | ||
lib.a = () => { | ||
console.log(); | ||
const result = () => console.log(); | ||
result.c = console.log; | ||
return result; | ||
}; | ||
lib.a.b = () => console.log(); | ||
|
||
lib(); // not removed | ||
lib.quuz(); // not removed | ||
lib.b(); // not removed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,8 @@ | ||
export const lib = () => console.log(); | ||
lib.baz = console.log; | ||
lib.a = () => { | ||
console.log(); | ||
const result = () => console.log(); | ||
result.c = console.log; | ||
return result; | ||
}; | ||
lib.a.b = () => console.log(); |