-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: newline characters in Solid (#3505)
* fix: remove source map consumption from babel transform * refactor: move inputSourceMap to integration option * tests: add newline ex to test build and dev * chore: change back to babel.transformAsync * chore: changeset
- Loading branch information
1 parent
45ae85c
commit 2b35650
Showing
6 changed files
with
29 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
'astro': patch | ||
'@astrojs/solid-js': patch | ||
--- | ||
|
||
Fix newline characters in SolidJS JSX attributes (ex: multiline CSS classes) |
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
15 changes: 15 additions & 0 deletions
15
packages/astro/test/fixtures/solid-component/src/components/WithNewlines.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,15 @@ | ||
// Test introduced to ensure JSX is correctly transformed | ||
// See https://github.com/withastro/astro/issues/3371 | ||
import { createSignal } from 'solid-js'; | ||
|
||
export default function WithNewlines() { | ||
const [count] = createSignal(0); | ||
|
||
return ( | ||
<> | ||
<div class="multiline | ||
css-classes">Hello world - {count}</div> | ||
</> | ||
); | ||
} |
2 changes: 2 additions & 0 deletions
2
packages/astro/test/fixtures/solid-component/src/pages/index.astro
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,11 +1,13 @@ | ||
--- | ||
import Hello from '../components/Hello.jsx'; | ||
import WithNewlines from '../components/WithNewlines.jsx'; | ||
--- | ||
<html> | ||
<head><title>Solid</title></head> | ||
<body> | ||
<div> | ||
<Hello client:load /> | ||
<WithNewlines client:load /> | ||
</div> | ||
</body> | ||
</html> |
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