Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import normalization resolves as out of root if path contains URL encoded characters #2585

Closed
GrygrFlzr opened this issue Mar 18, 2021 · 1 comment
Assignees

Comments

@GrygrFlzr
Copy link
Member

GrygrFlzr commented Mar 18, 2021

Describe the bug

Related: #2422 #2435

When the path contains URL encoded characters (e.g. a space, kanji like 東京), import normalization incorrectly resolves the path as "out of root". Unlike the related issues, this one happens regardless of operating system (tested on Windows, macOS, and Windows WSL2).

// normalize all imports into resolved URLs
// e.g. `import 'foo'` -> `import '/@fs/.../node_modules/foo/index.js`
if (resolved.id.startsWith(root + '/')) {
// in root: infer short absolute path from root
url = resolved.id.slice(root.length)
} else if (fs.existsSync(cleanUrl(resolved.id))) {
// exists but out of root: rewrite to absolute /@fs/ paths
url = path.posix.join(FS_PREFIX + resolved.id)
} else {
url = resolved.id
}

I'm guessing resolved.id.startsWith(root + '/') doesn't take the potential url encoding into account.
In the verbose logs below, root is C:/Users/GrygrFlzr/Documents/projects/directory with space.

Reproduction

npm init @vitejs/app
# name project with a space, e.g. 'directory with space'
# select svelte
cd "directory with space"
npm install

Open src/App.svelte and replace with:

<script>
  import { setContext } from "svelte";
  setContext("hello", "world");
</script>
npm run dev

Visit http://localhost:3000

Failed to init component
<App>
Error: Function called outside component initialization
    at get_current_component (http://localhost:3000/node_modules/svelte/internal/index.mjs?v=c49933bc:649:15)
    at setContext (http://localhost:3000/node_modules/svelte/internal/index.mjs?v=c49933bc:679:5)
    at instance (http://localhost:3000/src/App.svelte?import:39:2)
    at init (http://localhost:3000/@id/C:/Users/GrygrFlzr/Documents/projects/directory%20with%20space/node_modules/svelte/internal/index.mjs?v=c49933bc:1474:11)
    at new App (http://localhost:3000/src/App.svelte?import:53:3)
    at createProxiedComponent (http://localhost:3000/node_modules/svelte-hmr/runtime/svelte-hooks.js:245:9)
    at new ProxyComponent (http://localhost:3000/node_modules/svelte-hmr/runtime/proxy.js:240:20)
    at new Proxy<App> (http://localhost:3000/node_modules/svelte-hmr/runtime/proxy.js:340:11)
    at http://localhost:3000/src/main.js:3:13

System Info

  • vite version: 2.1.2
  • Operating System: Windows 10 10.0.19042
  • Node version: 14.16.0
  • Package manager: npm 6.14.11

Logs

npm run dev -- --debug
$ npm run dev -- --debug

> directory-with-space@0.0.0 dev C:\Users\GrygrFlzr\Documents\projects\directory with space
> vite "--debug"

  vite:config bundled config file loaded in 70ms +0ms
  vite:vite-plugin-svelte additional vite config {
  esbuild: { tsconfigRaw: { compilerOptions: [Object] } },
  optimizeDeps: {
    exclude: [
      'svelte/animate',
      'svelte/easing',
      'svelte/internal',
      'svelte/motion',
      'svelte/store',
      'svelte/transition',
      'svelte',
      'svelte-hmr/runtime/hot-api-esm.js',
      'svelte-hmr/runtime/proxy-adapter-dom.js',
      'svelte-hmr'
    ]
  },
  resolve: {
    mainFields: [ 'svelte', 'module', 'jsnext:main', 'jsnext' ],
    dedupe: [
      'svelte/animate',
      'svelte/easing',
      'svelte/internal',
      'svelte/motion',
      'svelte/store',
      'svelte/transition',
      'svelte',
      'svelte-hmr/runtime/hot-api-esm.js',
      'svelte-hmr/runtime/proxy-adapter-dom.js',
      'svelte-hmr'
    ]
  }
} +0ms
  vite:vite-plugin-svelte default options for development  {
  extensions: [ '.svelte' ],
  hot: { injectCss: false },
  emitCss: true,
  compilerOptions: { format: 'esm', css: false, dev: true }
} +6ms
  vite:vite-plugin-svelte no svelte config found at C:/Users/GrygrFlzr/Documents/projects/directory with space +1ms
  vite:vite-plugin-svelte resolved options {
  extensions: [ '.svelte' ],
  hot: { injectCss: false },
  emitCss: true,
  compilerOptions: { format: 'esm', css: false, dev: true },
  root: 'C:/Users/GrygrFlzr/Documents/projects/directory with space',
  isProduction: false,
  isBuild: false,
  isServe: true
} +0ms
  vite:config using resolved config: {
  vite:config   plugins: [
  vite:config     'vite:pre-alias',
  vite:config     'alias',
  vite:config     'vite-plugin-svelte',
  vite:config     'vite:dynamic-import-polyfill',
  vite:config     'vite:resolve',
  vite:config     'vite:html',
  vite:config     'vite:css',
  vite:config     'vite:esbuild',
  vite:config     'vite:json',
  vite:config     'vite:wasm',
  vite:config     'vite:worker',
  vite:config     'vite:asset',
  vite:config     'vite:define',
  vite:config     'vite:css-post',
  vite:config     'vite:client-inject',
  vite:config     'vite:import-analysis'
  vite:config   ],
  vite:config   server: {},
  vite:config   esbuild: { tsconfigRaw: { compilerOptions: [Object] } },
  vite:config   optimizeDeps: {
  vite:config     exclude: [
  vite:config       'svelte/animate',
  vite:config       'svelte/easing',
  vite:config       'svelte/internal',
  vite:config       'svelte/motion',
  vite:config       'svelte/store',
  vite:config       'svelte/transition',
  vite:config       'svelte',
  vite:config       'svelte-hmr/runtime/hot-api-esm.js',
  vite:config       'svelte-hmr/runtime/proxy-adapter-dom.js',
  vite:config       'svelte-hmr'
  vite:config     ]
  vite:config   },
  vite:config   resolve: {
  vite:config     dedupe: [
  vite:config       'svelte/animate',
  vite:config       'svelte/easing',
  vite:config       'svelte/internal',
  vite:config       'svelte/motion',
  vite:config       'svelte/store',
  vite:config       'svelte/transition',
  vite:config       'svelte',
  vite:config       'svelte-hmr/runtime/hot-api-esm.js',
  vite:config       'svelte-hmr/runtime/proxy-adapter-dom.js',
  vite:config       'svelte-hmr'
  vite:config     ],
  vite:config     mainFields: [ 'svelte', 'module', 'jsnext:main', 'jsnext' ],
  vite:config     alias: [ [Object] ]
  vite:config   },
  vite:config   configFile: 'C:/Users/GrygrFlzr/Documents/projects/directory with space/vite.config.js',
  vite:config   inlineConfig: {
  vite:config     root: undefined,
  vite:config     base: undefined,
  vite:config     mode: undefined,
  vite:config     configFile: undefined,
  vite:config     logLevel: undefined,
  vite:config     clearScreen: undefined,
  vite:config     server: {}
  vite:config   },
  vite:config   root: 'C:/Users/GrygrFlzr/Documents/projects/directory with space',
  vite:config   base: '/',
  vite:config   publicDir: 'C:\\Users\\GrygrFlzr\\Documents\\projects\\directory with space\\public',
  vite:config   command: 'serve',
  vite:config   mode: 'development',
  vite:config   isProduction: false,
  vite:config   optimizeCacheDir: 'C:\\Users\\GrygrFlzr\\Documents\\projects\\directory with space\\node_modules\\.vite',
  vite:config   build: {
  vite:config     target: [ 'es2019', 'edge18', 'firefox60', 'chrome61', 'safari11' ],
  vite:config     polyfillDynamicImport: true,
  vite:config     outDir: 'dist',
  vite:config     assetsDir: 'assets',
  vite:config     assetsInlineLimit: 4096,
  vite:config     cssCodeSplit: true,
  vite:config     sourcemap: false,
  vite:config     rollupOptions: {},
  vite:config     commonjsOptions: { include: [Array], extensions: [Array] },
  vite:config     minify: 'terser',
  vite:config     terserOptions: {},
  vite:config     cleanCssOptions: {},
  vite:config     write: true,
  vite:config     emptyOutDir: null,
  vite:config     manifest: false,
  vite:config     lib: false,
  vite:config     ssr: false,
  vite:config     ssrManifest: false,
  vite:config     brotliSize: true,
  vite:config     chunkSizeWarningLimit: 500
  vite:config   },
  vite:config   env: { BASE_URL: '/', MODE: 'development', DEV: true, PROD: false },
  vite:config   assetsInclude: [Function: assetsInclude],
  vite:config   logger: {
  vite:config     hasWarned: false,
  vite:config     info: [Function: info],
  vite:config     warn: [Function: warn],
  vite:config     error: [Function: error],
  vite:config     clearScreen: [Function: clearScreen]
  vite:config   },
  vite:config   createResolver: [Function: createResolver]
  vite:config } +8ms
  vite:deps Hash is consistent. Skipping. Use --force to override. +0ms

  vite v2.1.2 dev server running at:

  > Network:  http://192.168.56.1:3000/
  > Network:  http://192.168.50.36:3000/
  > Local:    http://localhost:3000/

  ready in 219ms.

  vite:spa-fallback Rewriting GET / to /index.html +0ms
  vite:vite-plugin-svelte transformIndexHtml <!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <link rel="icon" href="/favicon.ico" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Svelte + Vite App</title>
  </head>
  <body>
    <div id="app"></div>
    <script type="module" src="/src/main.js"></script>
  </body>
</html>
 +7s
  vite:time 17ms  /index.html +0ms
  vite:vite-plugin-svelte resolveId /Users/GrygrFlzr/Documents/projects/directory with space/node_modules/vite/dist/client/client +45ms
  vite:resolve 2ms   /Users/GrygrFlzr/Documents/projects/directory with space/node_modules/vite/dist/client/client -> C:/Users/GrygrFlzr/Documents/projects/directory with space/node_modules/vite/dist/client/client.js +0ms
  vite:resolve 3ms   /@vite/client -> C:/Users/GrygrFlzr/Documents/projects/directory with space/node_modules/vite/dist/client/client.js +0ms
  vite:vite-plugin-svelte resolveId /Users/GrygrFlzr/Documents/projects/directory with space/node_modules/vite/dist/client/client +3ms
  vite:vite-plugin-svelte resolveId /Users/GrygrFlzr/Documents/projects/directory with space/node_modules/vite/dist/client/client +1ms
  vite:vite-plugin-svelte resolveId /src/main.js +3ms
  vite:resolve 1ms   /src/main.js -> C:/Users/GrygrFlzr/Documents/projects/directory with space/src/main.js +6ms
  vite:vite-plugin-svelte resolveId /src/main.js +2ms
  vite:vite-plugin-svelte resolveId /src/main.js +0ms
  vite:load 1ms   [fs] /src/main.js +0ms
  vite:vite-plugin-svelte resolveId /src/main.js +2ms
  vite:vite-plugin-svelte resolveId {
  id: './App.svelte',
  cssId: './App.svelte.css?svelte&type=style',
  filename: './App.svelte',
  normalizedFilename: './App.svelte',
  query: [Object: null prototype] {},
  timestamp: 1616076663495,
  ssr: false
} +4ms
  vite:resolve 1ms   ./App.svelte -> C:/Users/GrygrFlzr/Documents/projects/directory with space/src/App.svelte +8ms
  vite:vite-plugin-svelte resolveId {
  id: '/src/App.svelte',
  cssId: '/src/App.svelte.css?svelte&type=style',
  filename: '/src/App.svelte',
  normalizedFilename: '/src/App.svelte',
  query: [Object: null prototype] {},
  timestamp: 1616076663497,
  ssr: false
} +2ms
  vite:resolve 1ms   /src/App.svelte -> C:/Users/GrygrFlzr/Documents/projects/directory with space/src/App.svelte +2ms
  vite:vite-plugin-svelte resolveId {
  id: '/src/App.svelte',
  cssId: '/src/App.svelte.css?svelte&type=style',
  filename: '/src/App.svelte',
  normalizedFilename: '/src/App.svelte',
  query: [Object: null prototype] {},
  timestamp: 1616076663498,
  ssr: false
} +1ms
  vite:transform 6ms   /src/main.js +0ms
  vite:time 12ms  /src/main.js +63ms
  vite:load 16ms  [fs] /@vite/client +10ms
  vite:vite-plugin-svelte resolveId /Users/GrygrFlzr/Documents/projects/directory with space/node_modules/vite/dist/client/client +3ms
  vite:vite-plugin-svelte resolveId ./env +4ms
  vite:resolve 1ms   ./env -> C:/Users/GrygrFlzr/Documents/projects/directory with space/node_modules/vite/dist/client/env.js +8ms
  vite:vite-plugin-svelte resolveId /node_modules/vite/dist/client/env.js +1ms
  vite:resolve 0ms   /node_modules/vite/dist/client/env.js -> C:/Users/GrygrFlzr/Documents/projects/directory with space/node_modules/vite/dist/client/env.js +0ms
  vite:vite-plugin-svelte resolveId /node_modules/vite/dist/client/env.js +1ms
  vite:transform 5ms   /@vite/client +8ms
  vite:time 30ms  /@vite/client +9ms
  vite:vite-plugin-svelte resolveId {
  id: '/src/App.svelte',
  cssId: '/src/App.svelte.css?svelte&type=style',
  filename: '/src/App.svelte',
  normalizedFilename: '/src/App.svelte',
  query: [Object: null prototype] {},
  timestamp: 1616076663508,
  ssr: false
} +1ms
  vite:vite-plugin-svelte resolveId {
  id: '/src/App.svelte',
  cssId: '/src/App.svelte.css?svelte&type=style',
  filename: '/src/App.svelte',
  normalizedFilename: '/src/App.svelte',
  query: [Object: null prototype] {},
  timestamp: 1616076663509,
  ssr: false
} +1ms
  vite:vite-plugin-svelte resolveId {
  id: '/src/App.svelte',
  cssId: '/src/App.svelte.css?svelte&type=style',
  filename: '/src/App.svelte',
  normalizedFilename: '/src/App.svelte',
  query: [Object: null prototype] {},
  timestamp: 1616076663510,
  ssr: false
} +1ms
  vite:vite-plugin-svelte load {
  id: 'C:/Users/GrygrFlzr/Documents/projects/directory with space/src/App.svelte',
  cssId: '/src/App.svelte.css?svelte&type=style',
  filename: 'C:/Users/GrygrFlzr/Documents/projects/directory with space/src/App.svelte',
  normalizedFilename: '/src/App.svelte',
  query: [Object: null prototype] {},
  timestamp: 1616076663511,
  ssr: false
} +1ms
  vite:vite-plugin-svelte resolveId /node_modules/vite/dist/client/env.js +1ms
  vite:vite-plugin-svelte resolveId /node_modules/vite/dist/client/env.js +1ms
  vite:vite-plugin-svelte resolveId /node_modules/vite/dist/client/env.js +0ms
  vite:load 3ms   [fs] /src/App.svelte +13ms
  vite:vite-plugin-svelte resolveId {
  id: '/src/App.svelte',
  cssId: '/src/App.svelte.css?svelte&type=style',
  filename: '/src/App.svelte',
  normalizedFilename: '/src/App.svelte',
  query: [Object: null prototype] {},
  timestamp: 1616076663514,
  ssr: false
} +1ms
  vite:vite-plugin-svelte transform {
  id: 'C:/Users/GrygrFlzr/Documents/projects/directory with space/src/App.svelte',
  cssId: '/src/App.svelte.css?svelte&type=style',
  filename: 'C:/Users/GrygrFlzr/Documents/projects/directory with space/src/App.svelte',
  normalizedFilename: '/src/App.svelte',
  query: [Object: null prototype] {},
  timestamp: 1616076663515,
  ssr: false
} +1ms
  vite:vite-plugin-svelte setting cssHash s-nH5PZLNcnzBp for /src/App.svelte.css?svelte&type=style +1ms
  vite:vite-plugin-svelte transform returns compiled js for C:/Users/GrygrFlzr/Documents/projects/directory with space/src/App.svelte +20ms
  vite:vite-plugin-svelte resolveId svelte/internal +2ms
  vite:vite-plugin-svelte resolveId did not resolve svelte/internal +1ms
  vite:resolve 4ms   svelte/internal -> C:/Users/GrygrFlzr/Documents/projects/directory%20with%20space/node_modules/svelte/internal/index.mjs?v=c49933bc +36ms
  vite:vite-plugin-svelte resolveId /@id/C:/Users/GrygrFlzr/Documents/projects/directory%20with%20space/node_modules/svelte/internal/index.mjs?v=c49933bc +4ms
  vite:resolve 1ms   /@id/C:/Users/GrygrFlzr/Documents/projects/directory%20with%20space/node_modules/svelte/internal/index.mjs?v=c49933bc -> null +2ms
  vite:vite-plugin-svelte resolveId svelte +1ms
  vite:vite-plugin-svelte resolveId did not resolve svelte +0ms
  vite:resolve 1ms   svelte -> C:/Users/GrygrFlzr/Documents/projects/directory%20with%20space/node_modules/svelte/index.mjs?v=c49933bc +1ms
  vite:vite-plugin-svelte resolveId /@id/C:/Users/GrygrFlzr/Documents/projects/directory%20with%20space/node_modules/svelte/index.mjs?v=c49933bc +1ms
  vite:resolve 1ms   /@id/C:/Users/GrygrFlzr/Documents/projects/directory%20with%20space/node_modules/svelte/index.mjs?v=c49933bc -> null +1ms
  vite:vite-plugin-svelte resolveId C:/Users/GrygrFlzr/Documents/projects/directory with space/node_modules/svelte-hmr/runtime/hot-api-esm.js +1ms
  vite:vite-plugin-svelte resolveId /node_modules/svelte-hmr/runtime/hot-api-esm.js +1ms
  vite:resolve 0ms   /node_modules/svelte-hmr/runtime/hot-api-esm.js -> C:/Users/GrygrFlzr/Documents/projects/directory with space/node_modules/svelte-hmr/runtime/hot-api-esm.js +1ms
  vite:vite-plugin-svelte resolveId C:/Users/GrygrFlzr/Documents/projects/directory with space/node_modules/svelte-hmr/runtime/proxy-adapter-dom.js +1ms
  vite:vite-plugin-svelte resolveId /node_modules/svelte-hmr/runtime/proxy-adapter-dom.js +0ms
  vite:resolve 1ms   /node_modules/svelte-hmr/runtime/proxy-adapter-dom.js -> C:/Users/GrygrFlzr/Documents/projects/directory with space/node_modules/svelte-hmr/runtime/proxy-adapter-dom.js +2ms
  vite:hmr [self-accepts] src\App.svelte +0ms
  vite:vite-plugin-svelte resolveId /@id/C:/Users/GrygrFlzr/Documents/projects/directory%20with%20space/node_modules/svelte/internal/index.mjs?v=c49933bc +1ms
  vite:vite-plugin-svelte resolveId /@id/C:/Users/GrygrFlzr/Documents/projects/directory%20with%20space/node_modules/svelte/index.mjs?v=c49933bc +1ms
  vite:vite-plugin-svelte resolveId /node_modules/svelte-hmr/runtime/hot-api-esm.js +1ms
  vite:vite-plugin-svelte resolveId /node_modules/svelte-hmr/runtime/proxy-adapter-dom.js +0ms
  vite:transform 37ms  /src/App.svelte +45ms
  vite:time 44ms  /src/App.svelte?import +44ms
  vite:load 39ms  [fs] /node_modules/vite/dist/client/env.js +39ms
  vite:vite-plugin-svelte resolveId /node_modules/vite/dist/client/env.js +2ms
  vite:rewrite 0ms   [no imports] node_modules\vite\dist\client\env.js +0ms
  vite:transform 0ms   /node_modules/vite/dist/client/env.js +2ms
  vite:time 43ms  /node_modules/vite/dist/client/env.js +3ms
  vite:vite-plugin-svelte resolveId /node_modules/svelte-hmr/runtime/hot-api-esm.js +5ms
  vite:vite-plugin-svelte resolveId /node_modules/svelte-hmr/runtime/hot-api-esm.js +1ms
  vite:vite-plugin-svelte resolveId /node_modules/svelte-hmr/runtime/hot-api-esm.js +0ms
  vite:vite-plugin-svelte resolveId /node_modules/svelte-hmr/runtime/proxy-adapter-dom.js +1ms
  vite:vite-plugin-svelte resolveId /node_modules/svelte-hmr/runtime/proxy-adapter-dom.js +1ms
  vite:vite-plugin-svelte resolveId /node_modules/svelte-hmr/runtime/proxy-adapter-dom.js +1ms
  vite:load 4ms   [fs] /node_modules/svelte-hmr/runtime/hot-api-esm.js +11ms
  vite:vite-plugin-svelte resolveId /node_modules/svelte-hmr/runtime/hot-api-esm.js +2ms
  vite:vite-plugin-svelte resolveId ../runtime/index.js +1ms
  vite:resolve 1ms   ../runtime/index.js -> C:/Users/GrygrFlzr/Documents/projects/directory with space/node_modules/svelte-hmr/runtime/index.js +17ms
  vite:vite-plugin-svelte resolveId /node_modules/svelte-hmr/runtime/index.js +1ms
  vite:resolve 0ms   /node_modules/svelte-hmr/runtime/index.js -> C:/Users/GrygrFlzr/Documents/projects/directory with space/node_modules/svelte-hmr/runtime/index.js +0ms
  vite:vite-plugin-svelte resolveId /node_modules/svelte-hmr/runtime/index.js +1ms
  vite:transform 2ms   /node_modules/svelte-hmr/runtime/hot-api-esm.js +13ms
  vite:time 10ms  /node_modules/svelte-hmr/runtime/hot-api-esm.js +12ms
  vite:load 6ms   [fs] /node_modules/svelte-hmr/runtime/proxy-adapter-dom.js +4ms
  vite:vite-plugin-svelte resolveId /node_modules/svelte-hmr/runtime/proxy-adapter-dom.js +1ms
  vite:vite-plugin-svelte resolveId ./overlay.js +1ms
  vite:resolve 0ms   ./overlay.js -> C:/Users/GrygrFlzr/Documents/projects/directory with space/node_modules/svelte-hmr/runtime/overlay.js +3ms
  vite:vite-plugin-svelte resolveId /node_modules/svelte-hmr/runtime/overlay.js +0ms
  vite:resolve 1ms   /node_modules/svelte-hmr/runtime/overlay.js -> C:/Users/GrygrFlzr/Documents/projects/directory with space/node_modules/svelte-hmr/runtime/overlay.js +1ms
  vite:vite-plugin-svelte resolveId /node_modules/svelte-hmr/runtime/overlay.js +1ms
  vite:transform 3ms   /node_modules/svelte-hmr/runtime/proxy-adapter-dom.js +4ms
  vite:time 11ms  /node_modules/svelte-hmr/runtime/proxy-adapter-dom.js +4ms
  vite:vite-plugin-svelte resolveId /node_modules/svelte-hmr/runtime/index.js +2ms
  vite:vite-plugin-svelte resolveId /node_modules/svelte-hmr/runtime/index.js +0ms
  vite:vite-plugin-svelte resolveId /node_modules/svelte-hmr/runtime/index.js +1ms
  vite:load 0ms   [fs] /node_modules/svelte-hmr/runtime/index.js +6ms
  vite:vite-plugin-svelte resolveId /node_modules/svelte-hmr/runtime/index.js +1ms
  vite:vite-plugin-svelte resolveId ./hot-api.js +1ms
  vite:resolve 0ms   ./hot-api.js -> C:/Users/GrygrFlzr/Documents/projects/directory with space/node_modules/svelte-hmr/runtime/hot-api.js +5ms
  vite:vite-plugin-svelte resolveId /node_modules/svelte-hmr/runtime/hot-api.js +0ms
  vite:resolve 1ms   /node_modules/svelte-hmr/runtime/hot-api.js -> C:/Users/GrygrFlzr/Documents/projects/directory with space/node_modules/svelte-hmr/runtime/hot-api.js +1ms
  vite:vite-plugin-svelte resolveId /node_modules/svelte-hmr/runtime/hot-api.js +1ms
  vite:transform 2ms   /node_modules/svelte-hmr/runtime/index.js +6ms
  vite:time 5ms   /node_modules/svelte-hmr/runtime/index.js +6ms
  vite:vite-plugin-svelte resolveId /node_modules/svelte-hmr/runtime/overlay.js +1ms
  vite:vite-plugin-svelte resolveId /node_modules/svelte-hmr/runtime/overlay.js +1ms
  vite:vite-plugin-svelte resolveId /node_modules/svelte-hmr/runtime/overlay.js +2ms
  vite:vite-plugin-svelte resolveId /node_modules/svelte-hmr/runtime/hot-api.js +0ms
  vite:vite-plugin-svelte resolveId /node_modules/svelte-hmr/runtime/hot-api.js +1ms
  vite:vite-plugin-svelte resolveId /node_modules/svelte-hmr/runtime/hot-api.js +1ms
  vite:load 3ms   [fs] /node_modules/svelte-hmr/runtime/overlay.js +9ms
  vite:vite-plugin-svelte resolveId /node_modules/svelte-hmr/runtime/overlay.js +1ms
  vite:rewrite 0ms   [no imports] node_modules\svelte-hmr\runtime\overlay.js +30ms
  vite:transform 0ms   /node_modules/svelte-hmr/runtime/overlay.js +7ms
  vite:time 7ms   /node_modules/svelte-hmr/runtime/overlay.js +7ms
  vite:load 1ms   [fs] /node_modules/svelte-hmr/runtime/hot-api.js +1ms
  vite:vite-plugin-svelte resolveId /node_modules/svelte-hmr/runtime/hot-api.js +2ms
  vite:vite-plugin-svelte resolveId ./proxy.js +0ms
  vite:resolve 1ms   ./proxy.js -> C:/Users/GrygrFlzr/Documents/projects/directory with space/node_modules/svelte-hmr/runtime/proxy.js +10ms
  vite:vite-plugin-svelte resolveId /node_modules/svelte-hmr/runtime/proxy.js +1ms
  vite:resolve 1ms   /node_modules/svelte-hmr/runtime/proxy.js -> C:/Users/GrygrFlzr/Documents/projects/directory with space/node_modules/svelte-hmr/runtime/proxy.js +1ms
  vite:vite-plugin-svelte resolveId /node_modules/svelte-hmr/runtime/proxy.js +1ms
  vite:transform 3ms   /node_modules/svelte-hmr/runtime/hot-api.js +4ms
  vite:time 8ms   /node_modules/svelte-hmr/runtime/hot-api.js +4ms
  vite:vite-plugin-svelte resolveId /node_modules/svelte-hmr/runtime/proxy.js +4ms
  vite:vite-plugin-svelte resolveId /node_modules/svelte-hmr/runtime/proxy.js +0ms
  vite:vite-plugin-svelte resolveId /node_modules/svelte-hmr/runtime/proxy.js +1ms
  vite:load 1ms   [fs] /node_modules/svelte-hmr/runtime/proxy.js +9ms
  vite:vite-plugin-svelte resolveId /node_modules/svelte-hmr/runtime/proxy.js +1ms
  vite:vite-plugin-svelte resolveId ./svelte-hooks.js +1ms
  vite:resolve 0ms   ./svelte-hooks.js -> C:/Users/GrygrFlzr/Documents/projects/directory with space/node_modules/svelte-hmr/runtime/svelte-hooks.js +7ms
  vite:vite-plugin-svelte resolveId /node_modules/svelte-hmr/runtime/svelte-hooks.js +0ms
  vite:resolve 1ms   /node_modules/svelte-hmr/runtime/svelte-hooks.js -> C:/Users/GrygrFlzr/Documents/projects/directory with space/node_modules/svelte-hmr/runtime/svelte-hooks.js +1ms
  vite:vite-plugin-svelte resolveId /node_modules/svelte-hmr/runtime/svelte-hooks.js +1ms
  vite:transform 3ms   /node_modules/svelte-hmr/runtime/proxy.js +8ms
  vite:time 6ms   /node_modules/svelte-hmr/runtime/proxy.js +8ms
  vite:vite-plugin-svelte resolveId /node_modules/svelte-hmr/runtime/svelte-hooks.js +4ms
  vite:vite-plugin-svelte resolveId /node_modules/svelte-hmr/runtime/svelte-hooks.js +1ms
  vite:vite-plugin-svelte resolveId /node_modules/svelte-hmr/runtime/svelte-hooks.js +0ms
  vite:load 0ms   [fs] /node_modules/svelte-hmr/runtime/svelte-hooks.js +8ms
  vite:vite-plugin-svelte resolveId /node_modules/svelte-hmr/runtime/svelte-hooks.js +1ms
  vite:vite-plugin-svelte resolveId svelte/internal +1ms
  vite:vite-plugin-svelte resolveId did not resolve svelte/internal +0ms
  vite:vite-plugin-svelte resolveId /@id/C:/Users/GrygrFlzr/Documents/projects/directory%20with%20space/node_modules/svelte/internal/index.mjs?v=c49933bc +1ms
  vite:vite-plugin-svelte resolveId /@id/C:/Users/GrygrFlzr/Documents/projects/directory%20with%20space/node_modules/svelte/internal/index.mjs?v=c49933bc +1ms
  vite:transform 6ms   /node_modules/svelte-hmr/runtime/svelte-hooks.js +12ms
  vite:time 9ms   /node_modules/svelte-hmr/runtime/svelte-hooks.js +12ms
  vite:time 0ms   /favicon.ico +29ms
@GrygrFlzr GrygrFlzr changed the title Import normalization resolves as out of root if path contains a space Import normalization resolves as out of root if path contains URL encoded characters Mar 18, 2021
@patak-dev
Copy link
Member

This is a regression, @GrygrFlzr is already working on a solution for it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants