-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disable react refresh for library targets (#7914)
For library targets: - Skips applying refresh transforms in JSTransformer - Skips applying ReactRefreshRuntime - Skips applying transforms in ReactRefreshWrapTransformer - Adds test asserting that runtime and transforms are not applied Fixes #7359, #7496, #7652, #7900 See also: #6892 Co-authored-by: Niklas Mischkulnig <4586894+mischnic@users.noreply.github.com>
- Loading branch information
Showing
8 changed files
with
64 additions
and
2 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
packages/core/integration-tests/test/integration/react-refresh-library-target/Component.jsx
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import React from 'react'; | ||
|
||
const Component = () => { | ||
return <div>test</div>; | ||
} | ||
|
||
export default Component |
3 changes: 3 additions & 0 deletions
3
packages/core/integration-tests/test/integration/react-refresh-library-target/index.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import Component from './Component' | ||
|
||
export {Component} |
9 changes: 9 additions & 0 deletions
9
packages/core/integration-tests/test/integration/react-refresh-library-target/package.json
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"source": "index.js", | ||
"main": "dist/main.js", | ||
"dependencies": { | ||
"@parcel/transformer-react-refresh-wrap": "*", | ||
"react": "*", | ||
"react-dom": "*" | ||
} | ||
} |
Empty file.
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
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