diff --git a/.changeset/slimy-cows-listen.md b/.changeset/slimy-cows-listen.md new file mode 100644 index 000000000000..adfca8dadc90 --- /dev/null +++ b/.changeset/slimy-cows-listen.md @@ -0,0 +1,5 @@ +--- +'@sveltejs/kit': patch +--- + +fix: make param matchers generated type import end with `.js` diff --git a/packages/kit/src/core/sync/write_types/index.js b/packages/kit/src/core/sync/write_types/index.js index 42728feaf187..e57b00183e6f 100644 --- a/packages/kit/src/core/sync/write_types/index.js +++ b/packages/kit/src/core/sync/write_types/index.js @@ -585,7 +585,7 @@ function replace_ext_with_js(file_path) { function generate_params_type(params, outdir, config) { /** @param {string} matcher */ const path_to_matcher = (matcher) => - posixify(path.relative(outdir, path.join(config.kit.files.params, matcher))); + posixify(path.relative(outdir, path.join(config.kit.files.params, matcher + '.js'))); return `{ ${params .map(