Skip to content

🐛 jss transform: support watch mode by allowing dupes if same file#30115

Merged
samouri merged 4 commits intoampproject:masterfrom
samouri:fixbentowatch
Sep 9, 2020
Merged

🐛 jss transform: support watch mode by allowing dupes if same file#30115
samouri merged 4 commits intoampproject:masterfrom
samouri:fixbentowatch

Conversation

@samouri
Copy link
Copy Markdown
Member

@samouri samouri commented Sep 3, 2020

summary
The recently introduced jss transform bans duplicate classnames from appearing.
As written, it breaks watch mode since when the same file is compiled twice it of course generates the same classnames.

This PR fixes it by allowing for dupes within the same file.

@samouri samouri self-assigned this Sep 3, 2020
@google-cla google-cla bot added the cla: yes label Sep 3, 2020
@amp-owners-bot
Copy link
Copy Markdown

amp-owners-bot bot commented Sep 3, 2020

Hey @erwinmombay, @jridgewell! These files were changed:

build-system/babel-plugins/babel-plugin-transform-jss/create-hash.js
build-system/babel-plugins/babel-plugin-transform-jss/index.js
build-system/babel-plugins/babel-plugin-transform-jss/test/index.js

@samouri samouri requested a review from dvoytenko September 9, 2020 15:55
@samouri samouri merged commit 6407ca8 into ampproject:master Sep 9, 2020
@samouri samouri deleted the fixbentowatch branch September 9, 2020 15:55
@dvoytenko
Copy link
Copy Markdown
Contributor

thanks!

ed-bird pushed a commit to ed-bird/amphtml that referenced this pull request Dec 10, 2020
…mpproject#30115)

* jss transform: support watch mode by allowing dupes if same file

* unit test

* fix tests

* remove describes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants