Skip to content

Commit 53ec08d

Browse files
authored
chore: replace @ts-expect-error with @ts-ignore so it doesn't error when rolldown-vite is installed (#13964)
* Update index.js * changeset * use ts-ignore so that vite ecosystem ci can pass * remove native plugins option and use ts-ignore * Delete .changeset/stupid-oranges-know.md
1 parent 96ce0f9 commit 53ec08d

File tree

2 files changed

+3
-13
lines changed

2 files changed

+3
-13
lines changed

packages/kit/src/exports/vite/build/build_service_worker.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ export async function build_service_worker(
103103
},
104104
output: {
105105
// .mjs so that esbuild doesn't incorrectly inject `export` https://github.com/vitejs/vite/issues/15379
106-
// @ts-expect-error `vite.rolldownVersion` only exists in `rolldown-vite`
106+
// @ts-ignore `vite.rolldownVersion` only exists in `rolldown-vite`
107107
entryFileNames: `service-worker.${vite.rolldownVersion ? 'js' : 'mjs'}`,
108108
assetFileNames: `${kit.appDir}/immutable/assets/[name].[hash][extname]`,
109109
inlineDynamicImports: true
@@ -130,7 +130,7 @@ export async function build_service_worker(
130130
});
131131

132132
// rename .mjs to .js to avoid incorrect MIME types with ancient webservers
133-
// @ts-expect-error `vite.rolldownVersion` only exists in `rolldown-vite`
133+
// @ts-ignore `vite.rolldownVersion` only exists in `rolldown-vite`
134134
if (!vite.rolldownVersion) {
135135
fs.renameSync(`${out}/client/service-worker.mjs`, `${out}/client/service-worker.js`);
136136
}

packages/kit/src/exports/vite/index.js

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -701,7 +701,7 @@ Tips:
701701
preserveEntrySignatures: 'strict',
702702
onwarn(warning, handler) {
703703
if (
704-
// @ts-expect-error `vite.rolldownVersion` only exists in `rolldown-vite`
704+
// @ts-ignore `vite.rolldownVersion` only exists in `rolldown-vite`
705705
(vite.rolldownVersion
706706
? warning.code === 'IMPORT_IS_UNDEFINED'
707707
: warning.code === 'MISSING_EXPORT') &&
@@ -729,11 +729,6 @@ Tips:
729729
}
730730
}
731731
}
732-
// TODO: enabling `experimental.enableNativePlugin` causes styles to not be applied
733-
// see https://github.com/vitejs/rolldown-vite/issues/213
734-
// experimental: {
735-
// enableNativePlugin: true
736-
// }
737732
};
738733
} else {
739734
new_config = {
@@ -747,11 +742,6 @@ Tips:
747742
}
748743
},
749744
publicDir: kit.files.assets
750-
// TODO: enabling `experimental.enableNativePlugin` causes styles to not be applied
751-
// see https://github.com/vitejs/rolldown-vite/issues/213
752-
// experimental: {
753-
// enableNativePlugin: true
754-
// }
755745
};
756746
}
757747

0 commit comments

Comments
 (0)