|
1 | 1 | import fs from 'fs'
|
2 | 2 | import path from 'path'
|
| 3 | +import { parse as parseUrl, pathToFileURL } from 'url' |
| 4 | +import { performance } from 'perf_hooks' |
| 5 | +import colors from 'picocolors' |
| 6 | +import dotenv from 'dotenv' |
| 7 | +import dotenvExpand from 'dotenv-expand' |
| 8 | +import type { Alias, AliasOptions } from 'types/alias' |
| 9 | +import { createFilter } from '@rollup/pluginutils' |
| 10 | +import aliasPlugin from '@rollup/plugin-alias' |
| 11 | +import { build } from 'esbuild' |
| 12 | +import type { RollupOptions } from 'rollup' |
3 | 13 | import type { Plugin } from './plugin'
|
4 | 14 | import type { BuildOptions } from './build'
|
5 | 15 | import { resolveBuildOptions } from './build'
|
6 | 16 | import type { ResolvedServerOptions, ServerOptions } from './server'
|
7 | 17 | import { resolveServerOptions } from './server'
|
8 |
| -import type { ResolvedPreviewOptions, PreviewOptions } from './preview' |
| 18 | +import type { PreviewOptions, ResolvedPreviewOptions } from './preview' |
9 | 19 | import { resolvePreviewOptions } from './preview'
|
10 | 20 | import type { CSSOptions } from './plugins/css'
|
11 | 21 | import {
|
12 | 22 | arraify,
|
13 | 23 | createDebugger,
|
| 24 | + dynamicImport, |
14 | 25 | isExternalUrl,
|
15 | 26 | isObject,
|
16 | 27 | lookupFile,
|
17 |
| - normalizePath, |
18 |
| - dynamicImport |
| 28 | + normalizePath |
19 | 29 | } from './utils'
|
20 | 30 | import { resolvePlugins } from './plugins'
|
21 |
| -import colors from 'picocolors' |
22 | 31 | import type { ESBuildOptions } from './plugins/esbuild'
|
23 |
| -import dotenv from 'dotenv' |
24 |
| -import dotenvExpand from 'dotenv-expand' |
25 |
| -import type { Alias, AliasOptions } from 'types/alias' |
26 |
| -import { CLIENT_ENTRY, ENV_ENTRY, DEFAULT_ASSETS_RE } from './constants' |
| 32 | +import { CLIENT_ENTRY, DEFAULT_ASSETS_RE, ENV_ENTRY } from './constants' |
27 | 33 | import type { InternalResolveOptions, ResolveOptions } from './plugins/resolve'
|
28 | 34 | import { resolvePlugin } from './plugins/resolve'
|
29 |
| -import type { Logger, LogLevel } from './logger' |
| 35 | +import type { LogLevel, Logger } from './logger' |
30 | 36 | import { createLogger } from './logger'
|
31 | 37 | import type { DepOptimizationOptions } from './optimizer'
|
32 |
| -import { createFilter } from '@rollup/pluginutils' |
33 |
| -import type { ResolvedBuildOptions } from '.' |
34 |
| -import { parse as parseUrl, pathToFileURL } from 'url' |
35 | 38 | import type { JsonOptions } from './plugins/json'
|
36 | 39 | import type { PluginContainer } from './server/pluginContainer'
|
37 | 40 | import { createPluginContainer } from './server/pluginContainer'
|
38 |
| -import aliasPlugin from '@rollup/plugin-alias' |
39 |
| -import { build } from 'esbuild' |
40 |
| -import { performance } from 'perf_hooks' |
41 | 41 | import type { PackageCache } from './packages'
|
42 |
| -import type { RollupOptions } from 'rollup' |
| 42 | +import type { ResolvedBuildOptions } from '.' |
43 | 43 |
|
44 | 44 | const debug = createDebugger('vite:config')
|
45 | 45 |
|
|
0 commit comments