Commit 9c933a2
Fix Syntax Errors in Remote Module Code Concatenation (#14728)
* Fix Syntax Errors in Remote Module Code Concatenation
Problem
Remote module transformation fails with syntax errors when the source file ends with an expression or a comment and does not include a trailing semicolon, space, or newline. This results in invalid concatenated code.
Root Cause
When Vite transforms .remote.js files, it concatenates the generated code with the original module. If the original module ends with an expression (e.g. console.log) or a comment without a trailing newline, the resulting code becomes syntactically invalid.
* chore: add changeset
* Apply suggestion from @dummdidumm
* Apply suggestion from @dummdidumm
---------
Co-authored-by: Simon H <[email protected]>1 parent c4f28a1 commit 9c933a2
File tree
2 files changed
+7
-1
lines changed- .changeset
- packages/kit/src/exports/vite
2 files changed
+7
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
755 | 755 | | |
756 | 756 | | |
757 | 757 | | |
758 | | - | |
| 758 | + | |
| 759 | + | |
759 | 760 | | |
760 | 761 | | |
761 | 762 | | |
| |||
0 commit comments