@sveltejs/vite-plugin-svelte 1.0.0-next.41 → 1.0.0-next.42

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/README.md CHANGED
@@ -10,11 +10,11 @@ import { defineConfig } from 'vite';
10
10
  import { svelte } from '@sveltejs/vite-plugin-svelte';
11
11
 
12
12
  export default defineConfig({
13
- plugins: [
14
- svelte({
15
- /* plugin options */
16
- })
17
- ]
13
+ plugins: [
14
+ svelte({
15
+ /* plugin options */
16
+ })
17
+ ]
18
18
  });
19
19
  ```
20
20
 
package/dist/index.cjs CHANGED
@@ -43,7 +43,7 @@ __export(src_exports, {
43
43
  });
44
44
  module.exports = __toCommonJS(src_exports);
45
45
 
46
- // ../../node_modules/.pnpm/tsup@5.12.4_typescript@4.6.3/node_modules/tsup/assets/cjs_shims.js
46
+ // ../../node_modules/.pnpm/tsup@5.12.5_typescript@4.6.3/node_modules/tsup/assets/cjs_shims.js
47
47
  var getImportMetaUrl = () => typeof document === "undefined" ? new URL("file:" + __filename).href : document.currentScript && document.currentScript.src || new URL("main.js", document.baseURI).href;
48
48
  var importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
49
49
 
@@ -279,7 +279,7 @@ function safeBase64Hash(input) {
279
279
  }
280
280
  const md5 = crypto.createHash("md5");
281
281
  md5.update(input);
282
- const hash = toSafe(md5.digest("base64")).substr(0, hash_length);
282
+ const hash = toSafe(md5.digest("base64")).slice(0, hash_length);
283
283
  hashes[input] = hash;
284
284
  return hash;
285
285
  }
@@ -476,6 +476,9 @@ var knownSvelteConfigNames = [
476
476
  ];
477
477
  var dynamicImportDefault = new Function("path", 'return import(path + "?t=" + Date.now()).then(m => m.default)');
478
478
  async function loadSvelteConfig(viteConfig, inlineOptions) {
479
+ if (inlineOptions.configFile === false) {
480
+ return;
481
+ }
479
482
  const configFile = findConfigToLoad(viteConfig, inlineOptions);
480
483
  if (configFile) {
481
484
  let err;