@ohos-ports/vite 8.3.0-beta.0

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/misc/false.js ADDED
@@ -0,0 +1 @@
1
+ export default false
package/misc/true.js ADDED
@@ -0,0 +1 @@
1
+ export default true
package/package.json ADDED
@@ -0,0 +1,194 @@
1
+ {
2
+ "name": "@ohos-ports/vite",
3
+ "version": "8.3.0-beta.0",
4
+ "description": "Native-ESM powered web dev build tool",
5
+ "keywords": [
6
+ "build-tool",
7
+ "dev-server",
8
+ "framework",
9
+ "frontend",
10
+ "hmr",
11
+ "vite"
12
+ ],
13
+ "homepage": "https://vite.dev",
14
+ "bugs": {
15
+ "url": "https://github.com/vitejs/vite/issues"
16
+ },
17
+ "license": "MIT",
18
+ "author": "Evan You",
19
+ "repository": {
20
+ "type": "git",
21
+ "url": "https://github.com/ohos-ports/ohos-ports.git",
22
+ "directory": "ports/vite/8.3.0"
23
+ },
24
+ "funding": "https://github.com/vitejs/vite?sponsor=1",
25
+ "bin": {
26
+ "vite": "bin/vite.js"
27
+ },
28
+ "files": [
29
+ "bin",
30
+ "dist",
31
+ "misc/**/*.js",
32
+ "client.d.ts",
33
+ "types"
34
+ ],
35
+ "type": "module",
36
+ "imports": {
37
+ "#module-sync-enabled": {
38
+ "module-sync": "./misc/true.js",
39
+ "default": "./misc/false.js"
40
+ },
41
+ "#types/*": "./types/*.d.ts",
42
+ "#dep-types/*": "./src/types/*.d.ts"
43
+ },
44
+ "exports": {
45
+ ".": "./dist/node/index.js",
46
+ "./client": {
47
+ "types": "./client.d.ts"
48
+ },
49
+ "./module-runner": "./dist/node/module-runner.js",
50
+ "./internal": "./dist/node/internal.js",
51
+ "./dist/client/*": "./dist/client/*",
52
+ "./types/*": {
53
+ "types": "./types/*"
54
+ },
55
+ "./types/internal/*": null,
56
+ "./package.json": "./package.json"
57
+ },
58
+ "dependencies": {
59
+ "lightningcss": "npm:@ohos-ports/lightningcss@1.33.0-1",
60
+ "picomatch": "^4.0.7",
61
+ "postcss": "^8.5.28",
62
+ "rolldown": "npm:@ohos-ports/rolldown@1.2.6-beta.4",
63
+ "tinyglobby": "^0.2.17"
64
+ },
65
+ "devDependencies": {
66
+ "@babel/parser": "^7.29.8",
67
+ "@jridgewell/remapping": "^2.3.5",
68
+ "@jridgewell/trace-mapping": "^0.3.31",
69
+ "@polka/compression": "^1.0.0-next.25",
70
+ "@rollup/plugin-alias": "^6.0.0",
71
+ "@rollup/plugin-dynamic-import-vars": "2.1.4",
72
+ "@rollup/pluginutils": "^5.4.0",
73
+ "@types/escape-html": "^1.0.4",
74
+ "@types/pnpapi": "^0.0.5",
75
+ "@vercel/detect-agent": "^1.2.5",
76
+ "@vitejs/devtools": "^0.7.1",
77
+ "@vitest/utils": "4.1.11",
78
+ "@voidzero-dev/vite-task-client": "^0.2.0",
79
+ "artichokie": "^0.4.4",
80
+ "baseline-browser-mapping": "^2.11.21",
81
+ "cac": "^7.0.0",
82
+ "chokidar": "^3.6.0",
83
+ "connect": "^3.7.0",
84
+ "convert-source-map": "^2.0.0",
85
+ "cors": "^2.8.6",
86
+ "cross-spawn": "^7.0.6",
87
+ "dotenv-expand": "^13.0.0",
88
+ "es-module-lexer": "^2.3.2",
89
+ "esbuild": "^0.28.2",
90
+ "escape-html": "^1.0.3",
91
+ "estree-walker": "^3.0.3",
92
+ "etag": "^1.8.1",
93
+ "fresh-import": "^0.2.1",
94
+ "host-validation-middleware": "^0.1.4",
95
+ "http-proxy-3": "^1.23.3",
96
+ "launch-editor-middleware": "^2.14.1",
97
+ "magic-string": "^1.2.3",
98
+ "mlly": "^1.8.2",
99
+ "mrmime": "^2.0.1",
100
+ "nanoid": "^5.1.16",
101
+ "obug": "^1.0.2",
102
+ "open": "^10.2.0",
103
+ "parse5": "^8.0.1",
104
+ "pathe": "^2.0.3",
105
+ "periscopic": "^4.0.3",
106
+ "picocolors": "^1.1.1",
107
+ "postcss-import": "^16.2.0",
108
+ "postcss-load-config": "^6.0.1",
109
+ "postcss-modules": "^9.0.1",
110
+ "premove": "^4.0.0",
111
+ "resolve.exports": "^2.0.3",
112
+ "rolldown-plugin-dts": "^0.28.3",
113
+ "rollup": "^4.59.0",
114
+ "rollup-plugin-license": "^3.7.1",
115
+ "sass": "^1.104.0",
116
+ "sass-embedded": "^1.104.0",
117
+ "sirv": "^3.0.2",
118
+ "strip-literal": "^4.0.0",
119
+ "terser": "^5.51.2",
120
+ "ufo": "^1.6.4",
121
+ "ws": "^8.21.3"
122
+ },
123
+ "peerDependencies": {
124
+ "@types/node": "^20.19.0 || >=22.12.0",
125
+ "@vitejs/devtools": "^0.7.1",
126
+ "esbuild": "^0.27.0 || ^0.28.0",
127
+ "jiti": ">=1.21.0",
128
+ "less": "^4.0.0",
129
+ "sass": "^1.70.0",
130
+ "sass-embedded": "^1.70.0",
131
+ "stylus": ">=0.54.8",
132
+ "sugarss": "^5.0.0",
133
+ "terser": "^5.16.0",
134
+ "tsx": "^4.8.1",
135
+ "yaml": "^2.4.2"
136
+ },
137
+ "peerDependenciesMeta": {
138
+ "@types/node": {
139
+ "optional": true
140
+ },
141
+ "@vitejs/devtools": {
142
+ "optional": true
143
+ },
144
+ "esbuild": {
145
+ "optional": true
146
+ },
147
+ "jiti": {
148
+ "optional": true
149
+ },
150
+ "sass": {
151
+ "optional": true
152
+ },
153
+ "sass-embedded": {
154
+ "optional": true
155
+ },
156
+ "stylus": {
157
+ "optional": true
158
+ },
159
+ "less": {
160
+ "optional": true
161
+ },
162
+ "sugarss": {
163
+ "optional": true
164
+ },
165
+ "terser": {
166
+ "optional": true
167
+ },
168
+ "tsx": {
169
+ "optional": true
170
+ },
171
+ "yaml": {
172
+ "optional": true
173
+ }
174
+ },
175
+ "optionalDependencies": {
176
+ "fsevents": "~2.3.3"
177
+ },
178
+ "engines": {
179
+ "node": "^20.19.0 || >=22.12.0"
180
+ },
181
+ "//": "READ CONTRIBUTING.md to understand what to put under deps vs. devDeps!",
182
+ "scripts": {
183
+ "dev": "premove dist && pnpm build-bundle -w",
184
+ "build": "premove dist && pnpm build-bundle && pnpm build-types",
185
+ "build-bundle": "rolldown --config rolldown.config.ts",
186
+ "build-types": "pnpm build-types-roll && pnpm build-types-check",
187
+ "build-types-roll": "rolldown --config rolldown.dts.config.ts",
188
+ "build-types-check": "tsc --project tsconfig.check.json",
189
+ "typecheck": "tsc && tsc -p src/node && tsc -p src/client && tsc -p src/module-runner && tsc -p src/shared && tsc -p src/node/__tests_dts__ && tsc -p src/module-runner/__tests_dts__",
190
+ "lint": "eslint --cache --ext .ts src/**",
191
+ "format": "oxfmt",
192
+ "generate-target": "tsx scripts/generateTarget.ts"
193
+ }
194
+ }
@@ -0,0 +1,83 @@
1
+ import type {
2
+ ErrorPayload,
3
+ FullReloadPayload,
4
+ PrunePayload,
5
+ UpdatePayload,
6
+ } from './hmrPayload.js'
7
+
8
+ export interface CustomEventMap {
9
+ // client events
10
+ 'vite:beforeUpdate': UpdatePayload
11
+ 'vite:afterUpdate': UpdatePayload
12
+ 'vite:beforePrune': PrunePayload
13
+ 'vite:beforeFullReload': FullReloadPayload
14
+ 'vite:error': ErrorPayload
15
+ 'vite:invalidate': InvalidatePayload
16
+ 'vite:ws:connect': WebSocketConnectionPayload
17
+ 'vite:ws:disconnect': WebSocketConnectionPayload
18
+ /** @internal */
19
+ 'vite:forward-console': ForwardConsolePayload
20
+ /** @internal */
21
+ 'vite:client-connected': { clientId: string }
22
+ /** @internal */
23
+ 'vite:bundled-dev:reload-needed': { reason: string }
24
+
25
+ // server events
26
+ 'vite:client:connect': undefined
27
+ 'vite:client:disconnect': undefined
28
+ }
29
+
30
+ export interface WebSocketConnectionPayload {
31
+ /**
32
+ * @experimental
33
+ * We expose this instance experimentally to see potential usage.
34
+ * This might be removed in the future if we didn't find reasonable use cases.
35
+ * If you find this useful, please open an issue with details so we can discuss and make it stable API.
36
+ */
37
+ // eslint-disable-next-line n/no-unsupported-features/node-builtins
38
+ webSocket: WebSocket
39
+ }
40
+
41
+ export interface InvalidatePayload {
42
+ /** Module URL of the invalidated module */
43
+ path: string
44
+ message: string | undefined
45
+ /** Module URL of the first module that invalidated the update */
46
+ firstInvalidatedBy: string
47
+ }
48
+
49
+ export type ForwardConsolePayload =
50
+ | {
51
+ type: 'error'
52
+ data: {
53
+ name: string
54
+ message: string
55
+ stack?: string
56
+ }
57
+ }
58
+ | {
59
+ type: 'unhandled-rejection'
60
+ data: {
61
+ name: string
62
+ message: string
63
+ stack?: string
64
+ }
65
+ }
66
+ | {
67
+ type: 'log'
68
+ data: {
69
+ level: string
70
+ message: string
71
+ }
72
+ }
73
+
74
+ /**
75
+ * provides types for payloads of built-in Vite events
76
+ */
77
+ export type InferCustomEventPayload<T extends string> =
78
+ T extends keyof CustomEventMap ? CustomEventMap[T] : any
79
+
80
+ /**
81
+ * provides types for names of built-in Vite events
82
+ */
83
+ export type CustomEventName = keyof CustomEventMap | (string & {})
@@ -0,0 +1,96 @@
1
+ /** @deprecated use HotPayload */
2
+ export type HMRPayload = HotPayload
3
+ export type HotPayload =
4
+ | ConnectedPayload
5
+ | PingPayload
6
+ | UpdatePayload
7
+ | BundledDevUpdatePayload
8
+ | FullReloadPayload
9
+ | CustomPayload
10
+ | ErrorPayload
11
+ | PrunePayload
12
+
13
+ export interface ConnectedPayload {
14
+ type: 'connected'
15
+ }
16
+
17
+ export interface PingPayload {
18
+ type: 'ping'
19
+ }
20
+
21
+ export interface UpdatePayload {
22
+ type: 'update'
23
+ updates: Update[]
24
+ }
25
+
26
+ /**
27
+ * Full-bundle-mode update notification. The client computes the HMR boundaries
28
+ * itself from `changedIds`.
29
+ */
30
+ export interface BundledDevUpdatePayload {
31
+ type: 'bundled-dev-update'
32
+ changedIds: string[]
33
+ /** URL of the per-client HMR patch chunk */
34
+ url: string
35
+ /** Per-client sequence number */
36
+ seq: number
37
+ }
38
+
39
+ export interface Update {
40
+ type: 'js-update' | 'css-update'
41
+ /** Module URL of the HMR boundary */
42
+ path: string
43
+ /** Module URL of the accepted module */
44
+ acceptedPath: string
45
+ timestamp: number
46
+ /** @internal */
47
+ explicitImportRequired?: boolean
48
+ /** @internal */
49
+ isWithinCircularImport?: boolean
50
+ /** @internal */
51
+ firstInvalidatedBy?: string
52
+ /** @internal */
53
+ invalidates?: string[]
54
+ }
55
+
56
+ export interface PrunePayload {
57
+ type: 'prune'
58
+ paths: string[]
59
+ }
60
+
61
+ export interface FullReloadPayload {
62
+ type: 'full-reload'
63
+ path?: string
64
+ /** @internal */
65
+ triggeredBy?: string
66
+ /**
67
+ * When set, only the bundling-fallback page acts on the reload;
68
+ * other pages ignore the message.
69
+ * @internal
70
+ */
71
+ ifFallback?: boolean
72
+ }
73
+
74
+ export interface CustomPayload {
75
+ type: 'custom'
76
+ event: string
77
+ data?: any
78
+ }
79
+
80
+ export interface ErrorPayload {
81
+ type: 'error'
82
+ err: {
83
+ [name: string]: any
84
+ message: string
85
+ stack: string
86
+ id?: string
87
+ frame?: string
88
+ plugin?: string
89
+ pluginCode?: string
90
+ loc?: {
91
+ file?: string
92
+ line: number
93
+ column: number
94
+ }
95
+ }
96
+ }
package/types/hot.d.ts ADDED
@@ -0,0 +1,39 @@
1
+ import type { CustomEventName, InferCustomEventPayload } from './customEvent.js'
2
+
3
+ export type ModuleNamespace = Record<string, any> & {
4
+ [Symbol.toStringTag]: 'Module'
5
+ }
6
+
7
+ export interface ViteHotContext {
8
+ readonly data: any
9
+
10
+ accept(): void
11
+ accept(cb: (mod: ModuleNamespace | undefined) => void): void
12
+ accept(dep: string, cb: (mod: ModuleNamespace | undefined) => void): void
13
+ accept(
14
+ deps: readonly string[],
15
+ cb: (mods: Array<ModuleNamespace | undefined>) => void,
16
+ ): void
17
+
18
+ acceptExports(
19
+ exportNames: string | readonly string[],
20
+ cb?: (mod: ModuleNamespace | undefined) => void,
21
+ ): void
22
+
23
+ dispose(cb: (data: any) => void): void
24
+ prune(cb: (data: any) => void): void
25
+ invalidate(message?: string): void
26
+
27
+ on<T extends CustomEventName>(
28
+ event: T,
29
+ cb: (payload: InferCustomEventPayload<T>) => void,
30
+ ): void
31
+ off<T extends CustomEventName>(
32
+ event: T,
33
+ cb: (payload: InferCustomEventPayload<T>) => void,
34
+ ): void
35
+ send<T extends CustomEventName>(
36
+ event: T,
37
+ data?: InferCustomEventPayload<T>,
38
+ ): void
39
+ }
@@ -0,0 +1,5 @@
1
+ /// <reference path="./importMeta.d.ts" />
2
+
3
+ // https://github.com/microsoft/TypeScript/issues/45096
4
+ // TypeScript has a bug that makes <reference types="vite/types/importMeta" />
5
+ // not possible in userland. This file provides a workaround for now.
@@ -0,0 +1,131 @@
1
+ // make input suggestions work
2
+ type StringQueryType = `?${keyof KnownAsTypeMap}` | (string & {})
3
+ type BaseQueryType = StringQueryType | Record<string, string | number | boolean>
4
+
5
+ export interface ImportGlobOptions<
6
+ Eager extends boolean,
7
+ AsType extends string,
8
+ QueryType extends BaseQueryType,
9
+ > {
10
+ /**
11
+ * Import type for the import url.
12
+ *
13
+ * @deprecated Use `query` instead, e.g. `as: 'url'` -> `query: '?url', import: 'default'`
14
+ */
15
+ as?: AsType
16
+ /**
17
+ * Import as static or dynamic
18
+ *
19
+ * @default false
20
+ */
21
+ eager?: Eager
22
+ /**
23
+ * Import only the specific named export. Set to `default` to import the default export.
24
+ */
25
+ import?: string
26
+ /**
27
+ * Custom queries
28
+ */
29
+ query?: QueryType
30
+ /**
31
+ * Search files also inside `node_modules/` and hidden directories (e.g. `.git/`). This might have impact on performance.
32
+ *
33
+ * @default false
34
+ */
35
+ exhaustive?: boolean
36
+ /**
37
+ * Base path to resolve relative paths.
38
+ */
39
+ base?: string
40
+ /**
41
+ * Whether the glob pattern matching should be case-sensitive. Defaults to `true`.
42
+ */
43
+ caseSensitive?: boolean
44
+ }
45
+
46
+ export type ImportGlobOptionsWithoutAs<
47
+ Eager extends boolean,
48
+ QueryType extends BaseQueryType,
49
+ > = Omit<ImportGlobOptions<Eager, string, QueryType>, 'as'> & {
50
+ as?: never
51
+ }
52
+
53
+ export type GeneralImportGlobOptions = ImportGlobOptions<
54
+ boolean,
55
+ string,
56
+ BaseQueryType
57
+ >
58
+
59
+ /**
60
+ * Declare Worker in case DOM is not added to the tsconfig lib causing
61
+ * Worker interface is not defined. For developers with DOM lib added,
62
+ * the Worker interface will be merged correctly.
63
+ */
64
+ declare global {
65
+ // eslint-disable-next-line @typescript-eslint/no-empty-object-type
66
+ interface Worker {}
67
+ }
68
+
69
+ export interface KnownAsTypeMap {
70
+ raw: string
71
+ url: string
72
+ worker: Worker
73
+ }
74
+
75
+ type KnownQueryTypeMap = {
76
+ [K in keyof KnownAsTypeMap as `?${K}`]: KnownAsTypeMap[K]
77
+ }
78
+
79
+ export interface ImportGlobFunction {
80
+ /**
81
+ * Import a list of files with a glob pattern.
82
+ *
83
+ * Overload 1A: No generic provided, infer the type from `eager` and `query`
84
+ */
85
+ <
86
+ Eager extends boolean,
87
+ Query extends BaseQueryType,
88
+ T = Query extends keyof KnownQueryTypeMap
89
+ ? KnownQueryTypeMap[Query]
90
+ : unknown,
91
+ >(
92
+ glob: string | string[],
93
+ options?: ImportGlobOptionsWithoutAs<Eager, Query>,
94
+ ): (Eager extends true ? true : false) extends true
95
+ ? Record<string, T>
96
+ : Record<string, () => Promise<T>>
97
+ /**
98
+ * Import a list of files with a glob pattern.
99
+ *
100
+ * Overload 1B: No generic provided, infer the type from `eager` and `as`
101
+ * (deprecated, use `query` instead)
102
+ */
103
+ <
104
+ Eager extends boolean,
105
+ As extends string,
106
+ T = As extends keyof KnownAsTypeMap ? KnownAsTypeMap[As] : unknown,
107
+ >(
108
+ glob: string | string[],
109
+ options?: ImportGlobOptions<Eager, As, BaseQueryType>,
110
+ ): (Eager extends true ? true : false) extends true
111
+ ? Record<string, T>
112
+ : Record<string, () => Promise<T>>
113
+ /**
114
+ * Import a list of files with a glob pattern.
115
+ *
116
+ * Overload 2: Module generic provided, infer the type from `eager: false`
117
+ */
118
+ <M>(
119
+ glob: string | string[],
120
+ options?: ImportGlobOptions<false, string, BaseQueryType>,
121
+ ): Record<string, () => Promise<M>>
122
+ /**
123
+ * Import a list of files with a glob pattern.
124
+ *
125
+ * Overload 3: Module generic provided, infer the type from `eager: true`
126
+ */
127
+ <M>(
128
+ glob: string | string[],
129
+ options: ImportGlobOptions<true, string, BaseQueryType>,
130
+ ): Record<string, M>
131
+ }
@@ -0,0 +1,30 @@
1
+ // This file is an augmentation to the built-in ImportMeta interface
2
+ // Thus cannot contain any top-level imports
3
+ // <https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation>
4
+
5
+ // This is tested in `packages/vite/src/node/__tests_dts__/typeOptions.ts`
6
+ // eslint-disable-next-line @typescript-eslint/no-empty-object-type -- to allow extending by users
7
+ interface ViteTypeOptions {
8
+ // strictImportMetaEnv: unknown
9
+ }
10
+
11
+ type ImportMetaEnvFallbackKey =
12
+ 'strictImportMetaEnv' extends keyof ViteTypeOptions ? never : string
13
+
14
+ interface ImportMetaEnv extends Record<ImportMetaEnvFallbackKey, any> {
15
+ BASE_URL: string
16
+ MODE: string
17
+ DEV: boolean
18
+ PROD: boolean
19
+ SSR: boolean
20
+ }
21
+
22
+ interface ImportMeta {
23
+ url: string
24
+
25
+ readonly hot?: import('./hot.js').ViteHotContext
26
+
27
+ readonly env: ImportMetaEnv
28
+
29
+ glob: import('./importGlob.js').ImportGlobFunction
30
+ }
@@ -0,0 +1,44 @@
1
+ /* eslint-disable @typescript-eslint/ban-ts-comment */
2
+
3
+ // @ts-ignore `less` may not be installed
4
+ import type Less from 'less'
5
+ // @ts-ignore `sass` may not be installed
6
+ import type DartSass from 'sass'
7
+ // @ts-ignore `sass-embedded` may not be installed
8
+ import type SassEmbedded from 'sass-embedded'
9
+ // @ts-ignore `stylus` may not be installed
10
+ import type Stylus from 'stylus'
11
+
12
+ /* eslint-enable @typescript-eslint/ban-ts-comment */
13
+
14
+ // https://github.com/type-challenges/type-challenges/issues/29285
15
+ type IsAny<T> = boolean extends (T extends never ? true : false) ? true : false
16
+
17
+ type DartSassStringOptionsAsync = DartSass.StringOptions<'async'>
18
+ type SassEmbeddedStringOptionsAsync = SassEmbedded.StringOptions<'async'>
19
+ type SassStringOptionsAsync =
20
+ IsAny<SassEmbeddedStringOptionsAsync> extends false
21
+ ? SassEmbeddedStringOptionsAsync
22
+ : DartSassStringOptionsAsync
23
+
24
+ export type SassModernPreprocessBaseOptions = Omit<
25
+ SassStringOptionsAsync,
26
+ 'url' | 'sourceMap'
27
+ >
28
+
29
+ export type LessPreprocessorBaseOptions = Omit<
30
+ Less.Options,
31
+ 'sourceMap' | 'filename'
32
+ >
33
+
34
+ export type StylusPreprocessorBaseOptions = Omit<
35
+ Stylus.RenderOptions,
36
+ 'filename'
37
+ > & { define?: Record<string, any> }
38
+
39
+ declare global {
40
+ // LESS' types somewhat references this which doesn't make sense in Node,
41
+ // so we have to shim it
42
+ // eslint-disable-next-line @typescript-eslint/no-empty-object-type
43
+ interface HTMLLinkElement {}
44
+ }
@@ -0,0 +1,9 @@
1
+ /* eslint-disable @typescript-eslint/ban-ts-comment */
2
+
3
+ // @ts-ignore `@vitejs/devtools` may not be installed
4
+ import type * as DevToolsConfig from '@vitejs/devtools/config'
5
+
6
+ /* eslint-enable @typescript-eslint/ban-ts-comment */
7
+
8
+ export type DevToolsConfig = DevToolsConfig.DevToolsConfig
9
+ export type ResolvedDevToolsConfig = DevToolsConfig.ResolvedDevToolsConfig
@@ -0,0 +1,28 @@
1
+ /* eslint-disable @typescript-eslint/ban-ts-comment */
2
+
3
+ // @ts-ignore `esbuild` may not be installed
4
+ import type esbuild from 'esbuild'
5
+
6
+ /* eslint-enable @typescript-eslint/ban-ts-comment */
7
+
8
+ export type EsbuildTarget = string | string[]
9
+
10
+ export type EsbuildLoader = esbuild.Loader
11
+ export type EsbuildTransformOptions = esbuild.TransformOptions
12
+ export type EsbuildTransformResult = esbuild.TransformResult
13
+
14
+ export type EsbuildMessage = esbuild.Message
15
+
16
+ export type DepsOptimizerEsbuildOptions = Omit<
17
+ esbuild.BuildOptions,
18
+ | 'bundle'
19
+ | 'entryPoints'
20
+ | 'external'
21
+ | 'write'
22
+ | 'watch'
23
+ | 'outdir'
24
+ | 'outfile'
25
+ | 'outbase'
26
+ | 'outExtension'
27
+ | 'metafile'
28
+ >
@@ -0,0 +1,18 @@
1
+ /* eslint-disable @typescript-eslint/ban-ts-comment */
2
+
3
+ // @ts-ignore `lightningcss` may not be installed
4
+ import type Lightningcss from 'lightningcss'
5
+
6
+ /* eslint-enable @typescript-eslint/ban-ts-comment */
7
+
8
+ export type LightningCSSOptions = Omit<
9
+ Lightningcss.BundleAsyncOptions<Lightningcss.CustomAtRules>,
10
+ | 'filename'
11
+ | 'resolver'
12
+ | 'minify'
13
+ | 'sourceMap'
14
+ | 'analyzeDependencies'
15
+ // properties not overridden by Vite, but does not make sense to set by end users
16
+ | 'inputSourceMap'
17
+ | 'projectRoot'
18
+ >