Open
Conversation
BREAKING CHANGE: Updates the declaration template. This is a followup on seek-oss#38 The `exports =` declaration was added in e7342df but removed in 908d491 due some issue in babel which I can't reproduce. Maybe that has been fixed downstream in the meantime. Due to microsoft/TypeScript#40594 we cannot export these names directly since class names might not be valid JavaScript identifiers, even though they are valid exported names. When that TypeScript bug is resolved this can be changed to export the names directly instead of using `export =`. The problem with `export =` is that it will let you do `import * as css from ...` in addition to `import css from ...` even though only `import *` will work.
6 tasks
Author
|
This is part of a series of pull requests which adds better ecosystem support for exporting original, non-mangled, CSS names as named exports. webpack/css-loader#1549 Due to the optimization bailout condition [webpack/webpack#17626] with JSON default exports consumed by hoistable functions, original non-minified CSS module class names can be found in the minified source code. |
6 tasks
Author
|
microsoft/TypeScript#40594 has been fixed and seems like it will land in 5.6.0. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
BREAKING CHANGE: Updates the declaration template.
This is a followup on #38
The
exports =declaration was added in e7342df but removed in 908d491 due some issue in babel which I can't reproduce. Maybe that has been fixed downstream in the meantime.Due to microsoft/TypeScript#40594 we cannot export these names directly since class names might not be valid JavaScript identifiers, even though they are valid exported names. When that TypeScript bug is resolved this can be changed to export the names directly instead of using
export =. The problem withexport =is that it will let you doimport * as css from ...in addition toimport css from ...even though onlyimport *will work.When the TypeScript bug is resolved this output should be converted to use named exports instead of
exports =Named exports resolve the Terser bailout condition described in webpack/webpack#17626 but reduce "grepability" of your code.