@sveltejs/kit 1.0.0-next.366 → 1.0.0-next.367
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +1 -1
- package/dist/vite.js +12 -10
- package/package.json +1 -1
package/dist/cli.js
CHANGED
package/dist/vite.js
CHANGED
|
@@ -263,9 +263,9 @@ const get_default_config = function ({ config, input, ssr, outDir }) {
|
|
|
263
263
|
input,
|
|
264
264
|
output: {
|
|
265
265
|
format: 'esm',
|
|
266
|
-
entryFileNames: ssr ? '[name].js' : '[name]-[hash].js',
|
|
267
|
-
chunkFileNames: 'chunks/[name]-[hash].js',
|
|
268
|
-
assetFileNames: 'assets/[name]-[hash][extname]'
|
|
266
|
+
entryFileNames: ssr ? '[name].js' : 'immutable/[name]-[hash].js',
|
|
267
|
+
chunkFileNames: 'immutable/chunks/[name]-[hash].js',
|
|
268
|
+
assetFileNames: 'immutable/assets/[name]-[hash][extname]'
|
|
269
269
|
},
|
|
270
270
|
preserveEntrySignatures: 'strict'
|
|
271
271
|
},
|
|
@@ -298,7 +298,7 @@ function assets_base(config) {
|
|
|
298
298
|
// during `svelte-kit preview`, because we use a local asset path. This
|
|
299
299
|
// may be fixed in Vite 3: https://github.com/vitejs/vite/issues/2009
|
|
300
300
|
const { base, assets } = config.paths;
|
|
301
|
-
return `${assets || base}/${config.appDir}
|
|
301
|
+
return `${assets || base}/${config.appDir}/`;
|
|
302
302
|
}
|
|
303
303
|
|
|
304
304
|
/**
|
|
@@ -372,7 +372,7 @@ export class Server {
|
|
|
372
372
|
manifest,
|
|
373
373
|
method_override: ${s(config.kit.methodOverride)},
|
|
374
374
|
paths: { base, assets },
|
|
375
|
-
prefix: assets + '/${config.kit.appDir}/
|
|
375
|
+
prefix: assets + '/${config.kit.appDir}/',
|
|
376
376
|
prerender: {
|
|
377
377
|
default: ${config.kit.prerender.default},
|
|
378
378
|
enabled: ${config.kit.prerender.enabled}
|
|
@@ -692,7 +692,7 @@ async function build_service_worker(
|
|
|
692
692
|
|
|
693
693
|
export const build = [
|
|
694
694
|
${Array.from(build)
|
|
695
|
-
.map((file) => `${s(`${config.kit.paths.base}/${config.kit.appDir}
|
|
695
|
+
.map((file) => `${s(`${config.kit.paths.base}/${config.kit.appDir}/${file}`)}`)
|
|
696
696
|
.join(',\n\t\t\t\t')}
|
|
697
697
|
];
|
|
698
698
|
|
|
@@ -2862,6 +2862,8 @@ function kit() {
|
|
|
2862
2862
|
function create_client_config() {
|
|
2863
2863
|
/** @type {Record<string, string>} */
|
|
2864
2864
|
const input = {
|
|
2865
|
+
// Put unchanging assets in immutable directory. We don't set that in the
|
|
2866
|
+
// outDir so that other plugins can add mutable assets to the bundle
|
|
2865
2867
|
start: `${get_runtime_path(svelte_config.kit)}/client/start.js`
|
|
2866
2868
|
};
|
|
2867
2869
|
|
|
@@ -2882,7 +2884,7 @@ function kit() {
|
|
|
2882
2884
|
config: svelte_config,
|
|
2883
2885
|
input,
|
|
2884
2886
|
ssr: false,
|
|
2885
|
-
outDir: `${paths.client_out_dir}
|
|
2887
|
+
outDir: `${paths.client_out_dir}`
|
|
2886
2888
|
});
|
|
2887
2889
|
}
|
|
2888
2890
|
|
|
@@ -2992,7 +2994,7 @@ function kit() {
|
|
|
2992
2994
|
|
|
2993
2995
|
/** @type {import('vite').Manifest} */
|
|
2994
2996
|
const vite_manifest = JSON.parse(
|
|
2995
|
-
fs__default.readFileSync(`${paths.client_out_dir}/
|
|
2997
|
+
fs__default.readFileSync(`${paths.client_out_dir}/manifest.json`, 'utf-8')
|
|
2996
2998
|
);
|
|
2997
2999
|
|
|
2998
3000
|
const entry_id = posixify(
|
|
@@ -3045,8 +3047,8 @@ function kit() {
|
|
|
3045
3047
|
|
|
3046
3048
|
const files = new Set([
|
|
3047
3049
|
...static_files,
|
|
3048
|
-
...chunks.map((chunk) => `${svelte_config.kit.appDir}
|
|
3049
|
-
...assets.map((chunk) => `${svelte_config.kit.appDir}
|
|
3050
|
+
...chunks.map((chunk) => `${svelte_config.kit.appDir}/${chunk.fileName}`),
|
|
3051
|
+
...assets.map((chunk) => `${svelte_config.kit.appDir}/${chunk.fileName}`)
|
|
3050
3052
|
]);
|
|
3051
3053
|
|
|
3052
3054
|
// TODO is this right?
|