-
Notifications
You must be signed in to change notification settings - Fork 191
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix production stripping in the production bundles (#1606)
* Fix prod stripping * WIP - put utilities to be stripped in their own package, so we can inline the package * WIP: it turns out terser can't do what we want so we have to do a custom babel plugin... * Revert "WIP: it turns out terser can't do what we want so we have to do a custom babel plugin..." This reverts commit 5cddba2b0a4616350ba4d9da572863e77cad0ffe. * Revert "WIP - put utilities to be stripped in their own package, so we can inline the package" This reverts commit 57406f687a7991b8b35c907b1e7483bb40a4d521. * Add babel plugin that removes code from @glimmer/debug that terser couldn't figure out -- I also left some notes about the problem that terser is running in to -- it seems to be related to indirection of identity functions that 'passes' isn't smart enough to figure out We get big wins (side-wise) from sideEffects: false, but things break. This babel plugin is feeling more and more brittle, the more we want to strip. * Inline glimmer-debug and hide all the metadata * Convert more of the Checkers to the NoopChecker * Tell the Tests how to handle VM_LOCAL_DEV
- Loading branch information
1 parent
10eae74
commit 3768842
Showing
15 changed files
with
1,697 additions
and
1,550 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
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,3 +1,2 @@ | ||
export { Package } from './lib/config.js'; | ||
export { default as importMeta } from './lib/import-meta.js'; | ||
export { default as inline } from './lib/inline.js'; |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,4 +1,54 @@ | ||
export { debug, debugSlice, logOpcode } from './lib/debug'; | ||
export * from './lib/metadata'; | ||
export { | ||
buildEnum, | ||
buildMetas, | ||
buildSingleMeta, | ||
META_KIND, | ||
normalize, | ||
normalizeAll, | ||
normalizeParsed, | ||
OPERAND_TYPES, | ||
strip, | ||
} from './lib/metadata'; | ||
export { opcodeMetadata } from './lib/opcode-metadata'; | ||
export * from './lib/stack-check'; | ||
export { | ||
check, | ||
CheckArray, | ||
CheckBlockSymbolTable, | ||
CheckBoolean, | ||
CheckDict, | ||
CheckDocumentFragment, | ||
CheckElement, | ||
CheckFunction, | ||
CheckHandle, | ||
CheckInstanceof, | ||
CheckInterface, | ||
CheckMaybe, | ||
CheckNode, | ||
CheckNumber, | ||
CheckObject, | ||
CheckOption, | ||
CheckOr, | ||
CheckPrimitive, | ||
CheckProgramSymbolTable, | ||
CheckSafeString, | ||
CheckString, | ||
CheckUndefined, | ||
CheckUnknown, | ||
recordStackSize, | ||
wrap, | ||
} from './lib/stack-check'; | ||
|
||
// Types are optimized await automatically | ||
export type { | ||
NormalizedMetadata, | ||
NormalizedOpcodes, | ||
Operand, | ||
OperandList, | ||
OperandName, | ||
OperandType, | ||
RawOperandFormat, | ||
RawOperandMetadata, | ||
Stack, | ||
} from './lib/metadata'; | ||
export type { Checker } from './lib/stack-check'; |
Oops, something went wrong.