diff --git a/guide/features.md b/guide/features.md index 12995eb6..3bcc5148 100644 --- a/guide/features.md +++ b/guide/features.md @@ -423,8 +423,8 @@ const modules = import.meta.glob('./dir/*.js') ```js // vite によって生成されたコード const modules = { - './dir/foo.js': () => import('./dir/foo.js'), './dir/bar.js': () => import('./dir/bar.js'), + './dir/foo.js': () => import('./dir/foo.js'), } ``` @@ -450,11 +450,11 @@ const modules = import.meta.glob('./dir/*.js', { eager: true }) ```js // vite によって生成されたコード -import * as __glob__0_0 from './dir/foo.js' -import * as __glob__0_1 from './dir/bar.js' +import * as __vite_glob_0_0 from './dir/bar.js' +import * as __vite_glob_0_1 from './dir/foo.js' const modules = { - './dir/foo.js': __glob__0_0, - './dir/bar.js': __glob__0_1, + './dir/bar.js': __vite_glob_0_0, + './dir/foo.js': __vite_glob_0_1, } ``` @@ -498,8 +498,8 @@ const modules = import.meta.glob('./dir/*.js', { import: 'setup' }) ```ts // vite によって生成されたコード const modules = { - './dir/foo.js': () => import('./dir/foo.js').then((m) => m.setup), './dir/bar.js': () => import('./dir/bar.js').then((m) => m.setup), + './dir/foo.js': () => import('./dir/foo.js').then((m) => m.setup), } ``` @@ -516,11 +516,11 @@ const modules = import.meta.glob('./dir/*.js', { ```ts // vite によって生成されたコード: -import { setup as __glob__0_0 } from './dir/foo.js' -import { setup as __glob__0_1 } from './dir/bar.js' +import { setup as __vite_glob_0_0 } from './dir/bar.js' +import { setup as __vite_glob_0_1 } from './dir/foo.js' const modules = { - './dir/foo.js': __glob__0_0, - './dir/bar.js': __glob__0_1, + './dir/bar.js': __vite_glob_0_0, + './dir/foo.js': __vite_glob_0_1, } ``` @@ -537,11 +537,11 @@ const modules = import.meta.glob('./dir/*.js', { ```ts // vite によって生成されたコード: -import __glob__0_0 from './dir/foo.js' -import __glob__0_1 from './dir/bar.js' +import { default as __vite_glob_0_0 } from './dir/bar.js' +import { default as __vite_glob_0_1 } from './dir/foo.js' const modules = { - './dir/foo.js': __glob__0_0, - './dir/bar.js': __glob__0_1, + './dir/bar.js': __vite_glob_0_0, + './dir/foo.js': __vite_glob_0_1, } ``` @@ -565,12 +565,12 @@ const moduleUrls = import.meta.glob('./dir/*.svg', { ```ts // vite によって生成されるコード: const moduleStrings = { - './dir/foo.svg': () => import('./dir/foo.js?raw').then((m) => m['default']), - './dir/bar.svg': () => import('./dir/bar.js?raw').then((m) => m['default']), + './dir/bar.svg': () => import('./dir/bar.svg?raw').then((m) => m['default']), + './dir/foo.svg': () => import('./dir/foo.svg?raw').then((m) => m['default']), } const moduleUrls = { - './dir/foo.svg': () => import('./dir/foo.js?url').then((m) => m['default']), - './dir/bar.svg': () => import('./dir/bar.js?url').then((m) => m['default']), + './dir/bar.svg': () => import('./dir/bar.svg?url').then((m) => m['default']), + './dir/foo.svg': () => import('./dir/foo.svg?url').then((m) => m['default']), } ```