-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Applying source maps naively seems to have the side effect of introducing redeclaration within a single module. For example, the src/reddit/pages/Recap/index.tsx module contains the following code:
const RECAP_CARD = "PersonalizedYearInReviewCommentCard",
RECAP_CARD = "PersonalizedYearInReviewEndCard",
RECAP_CARD = "PersonalizedYearInReviewGenericCard",
RECAP_CARD = "PersonalizedYearInReviewIntroCard",
RECAP_CARD = "PersonalizedYearInReviewPostCard",
RECAP_CARD = "PersonalizedYearInReviewShareCard",
RECAP_CARD = "PersonalizedYearInReviewSubredditCard",
RECAP_CARD = "PersonalizedYearInReviewSubredditListCard",
RECAP_CARD = "PersonalizedYearInReviewSingleStatSubredditListCard",
RECAP_CARD = "PersonalizedYearInReviewAvatarCard",
RECAP_CARD = "PersonalizedYearInReviewTopicListCard",
RECAP_CARD = "PersonalizedYearInReviewRPlaceTileListCard",
RECAP_CARD = "PersonalizedYearInReviewSingleTopicCard",
isPersonalizedYearInReviewShareCard = card => card.__typename === RECAP_CARD;The mappings in question seem to come from multiple sources. The source map for the bundle mentions multiple sources that don't correspond to modules within the bundle:
The redeclaration should be avoided in some way, such as by introducing modules based on source maps in addition to the Webpack module structure or by suffixing conflicting names.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
{ "sources": [ // ... "webpack:///./src/reddit/pages/Recap/CardTemplates/CommentCard.tsx", "webpack:///./src/reddit/pages/Recap/CardTemplates/EndCard.tsx", "webpack:///./src/reddit/pages/Recap/CardTemplates/GenericCard.tsx", "webpack:///./src/reddit/pages/Recap/CardTemplates/IntroCard.tsx", "webpack:///./src/reddit/pages/Recap/CardTemplates/PostCard.tsx", "webpack:///./src/reddit/pages/Recap/CardTemplates/RplaceCard.tsx", "webpack:///./src/reddit/pages/Recap/CardTemplates/ShareCard.tsx", "webpack:///./src/reddit/pages/Recap/CardTemplates/SingleStatSubredditListCard.tsx", "webpack:///./src/reddit/pages/Recap/CardTemplates/SingleTopicCard.tsx", "webpack:///./src/reddit/pages/Recap/CardTemplates/SubredditCard.tsx", "webpack:///./src/reddit/pages/Recap/CardTemplates/SubredditListCard.tsx", "webpack:///./src/reddit/pages/Recap/CardTemplates/TopicListCard.tsx", // ... ] }