Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Aug 5, 2025. It is now read-only.

fix: reload if included server.js files#356

Draft
tomoam wants to merge2 commits intosveltejs:main
base:main
Choose a base branch
Loading
fromtomoam:fixes-349
Draft
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletionsrc/lib/client/adapters/webcontainer/index.js
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -121,6 +121,8 @@ export async function create(base, error, progress, logs) {

const force_delete = [];

let include_server_files = false;

for (const stub of stubs) {
if (stub.name.endsWith('/__delete')) {
force_delete.push(stub.name.slice(0, -9));
Expand All@@ -136,6 +138,10 @@ export async function create(base, error, progress, logs) {

if (current?.contents !== stub.contents) {
to_write.push(stub);

if (!include_server_files || stub.basename.endsWith('server.js')) {
include_server_files = true;
}
}
} else {
// always add directories, otherwise convert_stubs_to_tree will fail
Expand DownExpand Up@@ -189,7 +195,7 @@ export async function create(base, error, progress, logs) {

// Also trigger a reload of the iframe in case new files were added / old ones deleted,
// because that can result in a broken UI state
const should_reload = !launched || will_restart || to_delete.length > 0;
const should_reload = !launched || will_restart || to_delete.length > 0 || include_server_files;

await launch();

Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp