@voidzero-dev/vite-plus-core 0.0.0-0bfcc90f.20260209-0731

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.
Files changed (114) hide show
  1. package/LICENSE +41 -0
  2. package/dist/pluginutils/filter/composable-filters.d.ts +90 -0
  3. package/dist/pluginutils/filter/composable-filters.js +256 -0
  4. package/dist/pluginutils/filter/filter-vite-plugins.d.ts +28 -0
  5. package/dist/pluginutils/filter/filter-vite-plugins.js +75 -0
  6. package/dist/pluginutils/filter/index.d.ts +3 -0
  7. package/dist/pluginutils/filter/index.js +3 -0
  8. package/dist/pluginutils/filter/simple-filters.d.ts +71 -0
  9. package/dist/pluginutils/filter/simple-filters.js +70 -0
  10. package/dist/pluginutils/index.d.ts +1 -0
  11. package/dist/pluginutils/index.js +1 -0
  12. package/dist/pluginutils/utils.d.ts +2 -0
  13. package/dist/pluginutils/utils.js +17 -0
  14. package/dist/rolldown/cli-setup.d.mts +1 -0
  15. package/dist/rolldown/cli-setup.mjs +17 -0
  16. package/dist/rolldown/cli.d.mts +1 -0
  17. package/dist/rolldown/cli.mjs +608 -0
  18. package/dist/rolldown/config.d.mts +7 -0
  19. package/dist/rolldown/config.mjs +10 -0
  20. package/dist/rolldown/experimental-index.d.mts +194 -0
  21. package/dist/rolldown/experimental-index.mjs +291 -0
  22. package/dist/rolldown/experimental-runtime-types.d.ts +98 -0
  23. package/dist/rolldown/filter-index.d.mts +197 -0
  24. package/dist/rolldown/filter-index.mjs +369 -0
  25. package/dist/rolldown/get-log-filter.d.mts +7 -0
  26. package/dist/rolldown/get-log-filter.mjs +47 -0
  27. package/dist/rolldown/index.d.mts +4 -0
  28. package/dist/rolldown/index.mjs +57 -0
  29. package/dist/rolldown/parallel-plugin-worker.d.mts +1 -0
  30. package/dist/rolldown/parallel-plugin-worker.mjs +32 -0
  31. package/dist/rolldown/parallel-plugin.d.mts +14 -0
  32. package/dist/rolldown/parallel-plugin.mjs +7 -0
  33. package/dist/rolldown/parse-ast-index.d.mts +8 -0
  34. package/dist/rolldown/parse-ast-index.mjs +47 -0
  35. package/dist/rolldown/plugins-index.d.mts +30 -0
  36. package/dist/rolldown/plugins-index.mjs +40 -0
  37. package/dist/rolldown/shared/binding-D-XMzSaG.d.mts +1665 -0
  38. package/dist/rolldown/shared/binding-DuOSzYPt.mjs +587 -0
  39. package/dist/rolldown/shared/bindingify-input-options-Bu6nUTgS.mjs +2257 -0
  40. package/dist/rolldown/shared/constructors-DZVRHTli.mjs +61 -0
  41. package/dist/rolldown/shared/constructors-KD7LvxpN.d.mts +28 -0
  42. package/dist/rolldown/shared/define-config-BVG4QvnP.mjs +7 -0
  43. package/dist/rolldown/shared/define-config-U4pj0ZDn.d.mts +3616 -0
  44. package/dist/rolldown/shared/load-config-O1K_tT_z.mjs +114 -0
  45. package/dist/rolldown/shared/logging-CE90D8JR.d.mts +50 -0
  46. package/dist/rolldown/shared/logs-NH298mHo.mjs +183 -0
  47. package/dist/rolldown/shared/misc-CCZIsXVO.mjs +22 -0
  48. package/dist/rolldown/shared/normalize-string-or-regex-DeZqg15i.mjs +61 -0
  49. package/dist/rolldown/shared/parse-DLraxqjd.mjs +56 -0
  50. package/dist/rolldown/shared/prompt-DeISmFRp.mjs +847 -0
  51. package/dist/rolldown/shared/rolldown-O0UKbTKf.mjs +42 -0
  52. package/dist/rolldown/shared/rolldown-build-BIs7C4B_.mjs +3354 -0
  53. package/dist/rolldown/shared/watch-DQXGaDjx.mjs +379 -0
  54. package/dist/tsdown/build-l5WhXg4M-BBPqZr0m.js +4933 -0
  55. package/dist/tsdown/chunk-CdeBBKNj.js +44 -0
  56. package/dist/tsdown/debug-Cb_Nqpo4-BueIRvg1.js +18 -0
  57. package/dist/tsdown/detect-CCATtVj7-B86m8IqW.js +165 -0
  58. package/dist/tsdown/dist-BUOkzr_P.js +201 -0
  59. package/dist/tsdown/dist-BVMGwPdF.js +32363 -0
  60. package/dist/tsdown/dist-dc0X0G6b.js +742 -0
  61. package/dist/tsdown/filename-7rlgePeo.js +31 -0
  62. package/dist/tsdown/index-node-BjDys8jy--sqPE5mM.js +251 -0
  63. package/dist/tsdown/index-types.d.ts +2163 -0
  64. package/dist/tsdown/index.js +14 -0
  65. package/dist/tsdown/main-d9yZSQqW.js +926 -0
  66. package/dist/tsdown/node-Cb5OsnKg.js +271 -0
  67. package/dist/tsdown/npm_cjs_chunk_chunk.cjs +11 -0
  68. package/dist/tsdown/npm_cjs_chunk_range.cjs +484 -0
  69. package/dist/tsdown/npm_cjs_chunk_semver.cjs +362 -0
  70. package/dist/tsdown/npm_entry_picomatch.cjs +1676 -0
  71. package/dist/tsdown/npm_entry_semver_functions_coerce.cjs +52 -0
  72. package/dist/tsdown/npm_entry_semver_functions_satisfies.cjs +23 -0
  73. package/dist/tsdown/npm_entry_semver_ranges_min-version.cjs +48 -0
  74. package/dist/tsdown/npm_entry_tree-kill.cjs +103 -0
  75. package/dist/tsdown/resolver-j7HY1N36-CIu_7LX6.js +20 -0
  76. package/dist/tsdown/run.js +537 -0
  77. package/dist/tsdown/tsc-context-BNYuT3cE.js +25 -0
  78. package/dist/tsdown/tsc-reo6aLWc.js +423 -0
  79. package/dist/vite/client/client.mjs +1140 -0
  80. package/dist/vite/client/env.mjs +19 -0
  81. package/dist/vite/client.d.ts +279 -0
  82. package/dist/vite/misc/false.d.ts +2 -0
  83. package/dist/vite/misc/false.js +1 -0
  84. package/dist/vite/misc/true.d.ts +2 -0
  85. package/dist/vite/misc/true.js +1 -0
  86. package/dist/vite/node/chunks/build2.js +5538 -0
  87. package/dist/vite/node/chunks/chunk.js +45 -0
  88. package/dist/vite/node/chunks/dist.js +6758 -0
  89. package/dist/vite/node/chunks/dist2.js +6651 -0
  90. package/dist/vite/node/chunks/fetchableEnvironments.js +41395 -0
  91. package/dist/vite/node/chunks/lib.js +377 -0
  92. package/dist/vite/node/chunks/logger.js +332 -0
  93. package/dist/vite/node/chunks/moduleRunnerTransport.d.ts +96 -0
  94. package/dist/vite/node/chunks/postcss-import.js +479 -0
  95. package/dist/vite/node/cli.js +699 -0
  96. package/dist/vite/node/index.d.ts +3807 -0
  97. package/dist/vite/node/index.js +15 -0
  98. package/dist/vite/node/internal.d.ts +2 -0
  99. package/dist/vite/node/internal.js +3 -0
  100. package/dist/vite/node/module-runner.d.ts +311 -0
  101. package/dist/vite/node/module-runner.js +1159 -0
  102. package/dist/vite/types/customEvent.d.ts +52 -0
  103. package/dist/vite/types/hmrPayload.d.ts +80 -0
  104. package/dist/vite/types/hot.d.ts +39 -0
  105. package/dist/vite/types/import-meta.d.ts +5 -0
  106. package/dist/vite/types/importGlob.d.ts +89 -0
  107. package/dist/vite/types/importMeta.d.ts +30 -0
  108. package/dist/vite/types/internal/cssPreprocessorOptions.d.ts +44 -0
  109. package/dist/vite/types/internal/esbuildOptions.d.ts +28 -0
  110. package/dist/vite/types/internal/lightningcssOptions.d.ts +18 -0
  111. package/dist/vite/types/internal/rollupTypeCompat.d.ts +24 -0
  112. package/dist/vite/types/internal/terserOptions.d.ts +11 -0
  113. package/dist/vite/types/metadata.d.ts +47 -0
  114. package/package.json +204 -0
@@ -0,0 +1,52 @@
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:module-loaded': { modules: string[] }
20
+
21
+ // server events
22
+ 'vite:client:connect': undefined
23
+ 'vite:client:disconnect': undefined
24
+ }
25
+
26
+ export interface WebSocketConnectionPayload {
27
+ /**
28
+ * @experimental
29
+ * We expose this instance experimentally to see potential usage.
30
+ * This might be removed in the future if we didn't find reasonable use cases.
31
+ * If you find this useful, please open an issue with details so we can discuss and make it stable API.
32
+ */
33
+ // eslint-disable-next-line n/no-unsupported-features/node-builtins
34
+ webSocket: WebSocket
35
+ }
36
+
37
+ export interface InvalidatePayload {
38
+ path: string
39
+ message: string | undefined
40
+ firstInvalidatedBy: string
41
+ }
42
+
43
+ /**
44
+ * provides types for payloads of built-in Vite events
45
+ */
46
+ export type InferCustomEventPayload<T extends string> =
47
+ T extends keyof CustomEventMap ? CustomEventMap[T] : any
48
+
49
+ /**
50
+ * provides types for names of built-in Vite events
51
+ */
52
+ export type CustomEventName = keyof CustomEventMap | (string & {})
@@ -0,0 +1,80 @@
1
+ /** @deprecated use HotPayload */
2
+ export type HMRPayload = HotPayload
3
+ export type HotPayload =
4
+ | ConnectedPayload
5
+ | PingPayload
6
+ | UpdatePayload
7
+ | FullReloadPayload
8
+ | CustomPayload
9
+ | ErrorPayload
10
+ | PrunePayload
11
+
12
+ export interface ConnectedPayload {
13
+ type: 'connected'
14
+ }
15
+
16
+ export interface PingPayload {
17
+ type: 'ping'
18
+ }
19
+
20
+ export interface UpdatePayload {
21
+ type: 'update'
22
+ updates: Update[]
23
+ }
24
+
25
+ export interface Update {
26
+ type: 'js-update' | 'css-update'
27
+ /**
28
+ * URL of HMR patch chunk
29
+ *
30
+ * This only exists when full-bundle mode is enabled.
31
+ */
32
+ url?: string
33
+ path: string
34
+ acceptedPath: string
35
+ timestamp: number
36
+ /** @internal */
37
+ explicitImportRequired?: boolean
38
+ /** @internal */
39
+ isWithinCircularImport?: boolean
40
+ /** @internal */
41
+ firstInvalidatedBy?: string
42
+ /** @internal */
43
+ invalidates?: string[]
44
+ }
45
+
46
+ export interface PrunePayload {
47
+ type: 'prune'
48
+ paths: string[]
49
+ }
50
+
51
+ export interface FullReloadPayload {
52
+ type: 'full-reload'
53
+ path?: string
54
+ /** @internal */
55
+ triggeredBy?: string
56
+ }
57
+
58
+ export interface CustomPayload {
59
+ type: 'custom'
60
+ event: string
61
+ data?: any
62
+ }
63
+
64
+ export interface ErrorPayload {
65
+ type: 'error'
66
+ err: {
67
+ [name: string]: any
68
+ message: string
69
+ stack: string
70
+ id?: string
71
+ frame?: string
72
+ plugin?: string
73
+ pluginCode?: string
74
+ loc?: {
75
+ file?: string
76
+ line: number
77
+ column: number
78
+ }
79
+ }
80
+ }
@@ -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,89 @@
1
+ export interface ImportGlobOptions<
2
+ Eager extends boolean,
3
+ AsType extends string,
4
+ > {
5
+ /**
6
+ * Import type for the import url.
7
+ *
8
+ * @deprecated Use `query` instead, e.g. `as: 'url'` -> `query: '?url', import: 'default'`
9
+ */
10
+ as?: AsType
11
+ /**
12
+ * Import as static or dynamic
13
+ *
14
+ * @default false
15
+ */
16
+ eager?: Eager
17
+ /**
18
+ * Import only the specific named export. Set to `default` to import the default export.
19
+ */
20
+ import?: string
21
+ /**
22
+ * Custom queries
23
+ */
24
+ query?: string | Record<string, string | number | boolean>
25
+ /**
26
+ * Search files also inside `node_modules/` and hidden directories (e.g. `.git/`). This might have impact on performance.
27
+ *
28
+ * @default false
29
+ */
30
+ exhaustive?: boolean
31
+ /**
32
+ * Base path to resolve relative paths.
33
+ */
34
+ base?: string
35
+ }
36
+
37
+ export type GeneralImportGlobOptions = ImportGlobOptions<boolean, string>
38
+
39
+ /**
40
+ * Declare Worker in case DOM is not added to the tsconfig lib causing
41
+ * Worker interface is not defined. For developers with DOM lib added,
42
+ * the Worker interface will be merged correctly.
43
+ */
44
+ declare global {
45
+ // eslint-disable-next-line @typescript-eslint/no-empty-object-type
46
+ interface Worker {}
47
+ }
48
+
49
+ export interface KnownAsTypeMap {
50
+ raw: string
51
+ url: string
52
+ worker: Worker
53
+ }
54
+
55
+ export interface ImportGlobFunction {
56
+ /**
57
+ * Import a list of files with a glob pattern.
58
+ *
59
+ * Overload 1: No generic provided, infer the type from `eager` and `as`
60
+ */
61
+ <
62
+ Eager extends boolean,
63
+ As extends string,
64
+ T = As extends keyof KnownAsTypeMap ? KnownAsTypeMap[As] : unknown,
65
+ >(
66
+ glob: string | string[],
67
+ options?: ImportGlobOptions<Eager, As>,
68
+ ): (Eager extends true ? true : false) extends true
69
+ ? Record<string, T>
70
+ : Record<string, () => Promise<T>>
71
+ /**
72
+ * Import a list of files with a glob pattern.
73
+ *
74
+ * Overload 2: Module generic provided, infer the type from `eager: false`
75
+ */
76
+ <M>(
77
+ glob: string | string[],
78
+ options?: ImportGlobOptions<false, string>,
79
+ ): Record<string, () => Promise<M>>
80
+ /**
81
+ * Import a list of files with a glob pattern.
82
+ *
83
+ * Overload 3: Module generic provided, infer the type from `eager: true`
84
+ */
85
+ <M>(
86
+ glob: string | string[],
87
+ options: ImportGlobOptions<true, string>,
88
+ ): Record<string, M>
89
+ }
@@ -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 `sass` may not be installed
4
+ import type DartSass from 'sass'
5
+ // @ts-ignore `sass-embedded` may not be installed
6
+ import type SassEmbedded from 'sass-embedded'
7
+ // @ts-ignore `less` may not be installed
8
+ import type Less from 'less'
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,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
+ >
@@ -0,0 +1,24 @@
1
+ import type * as Rolldown from '@voidzero-dev/vite-plus-core/rolldown'
2
+
3
+ export * from '@voidzero-dev/vite-plus-core/rolldown'
4
+
5
+ /** @deprecated use RolldownBuild instead */
6
+ export type RollupBuild = Rolldown.RolldownBuild
7
+
8
+ /** @deprecated use RolldownOptions instead */
9
+ export type RollupOptions = Rolldown.RolldownOptions
10
+
11
+ /** @deprecated use RolldownOutput instead */
12
+ export type RollupOutput = Rolldown.RolldownOutput
13
+
14
+ /** @deprecated use RolldownPlugin instead */
15
+ export type RollupPlugin = Rolldown.RolldownPlugin
16
+
17
+ /** @deprecated use RolldownPluginOption instead */
18
+ export type RollupPluginOption = Rolldown.RolldownPluginOption
19
+
20
+ /** @deprecated use RolldownWatcher instead */
21
+ export type RollupWatcher = Rolldown.RolldownWatcher
22
+
23
+ /** @deprecated use RollupWatcherEvent instead */
24
+ export type RollupWatcherEvent = Rolldown.RolldownWatcherEvent
@@ -0,0 +1,11 @@
1
+ /* eslint-disable @typescript-eslint/ban-ts-comment */
2
+
3
+ // @ts-ignore `terser` may not be installed
4
+ export type * as Terser from 'terser'
5
+ // @ts-ignore `terser` may not be installed
6
+ import type * as Terser from 'terser'
7
+
8
+ /* eslint-enable @typescript-eslint/ban-ts-comment */
9
+
10
+ export type TerserMinifyOptions = Terser.MinifyOptions
11
+ export type TerserMinifyOutput = Terser.MinifyOutput
@@ -0,0 +1,47 @@
1
+ export interface AssetMetadata {
2
+ importedAssets: Set<string>
3
+ importedCss: Set<string>
4
+ }
5
+
6
+ export interface ChunkMetadata {
7
+ importedAssets: Set<string>
8
+ importedCss: Set<string>
9
+ /** @internal */
10
+ __modules: any
11
+ }
12
+
13
+ export interface CustomPluginOptionsVite {
14
+ /**
15
+ * If this is a CSS Rollup module, you can scope to its importer's exports
16
+ * so that if those exports are treeshaken away, the CSS module will also
17
+ * be treeshaken.
18
+ *
19
+ * The "importerId" must import the CSS Rollup module statically.
20
+ *
21
+ * Example config if the CSS id is `/src/App.vue?vue&type=style&lang.css`:
22
+ * ```js
23
+ * cssScopeTo: ['/src/App.vue', 'default']
24
+ * ```
25
+ */
26
+ cssScopeTo?: readonly [importerId: string, exportName: string | undefined]
27
+
28
+ /** @deprecated no-op since Vite 6.1 */
29
+ lang?: string
30
+ }
31
+
32
+ declare module '@voidzero-dev/vite-plus-core/rolldown' {
33
+ export interface OutputAsset {
34
+ viteMetadata?: AssetMetadata
35
+ }
36
+
37
+ export interface RenderedChunk {
38
+ viteMetadata?: ChunkMetadata
39
+ }
40
+ export interface OutputChunk {
41
+ viteMetadata?: ChunkMetadata
42
+ }
43
+
44
+ export interface CustomPluginOptions {
45
+ vite?: CustomPluginOptionsVite
46
+ }
47
+ }
package/package.json ADDED
@@ -0,0 +1,204 @@
1
+ {
2
+ "name": "@voidzero-dev/vite-plus-core",
3
+ "version": "0.0.0-0bfcc90f.20260209-0731",
4
+ "files": [
5
+ "dist"
6
+ ],
7
+ "type": "module",
8
+ "main": "./dist/vite/node/index.js",
9
+ "types": "./dist/vite/node/index.d.ts",
10
+ "typesVersions": {
11
+ "*": {
12
+ "module-runner": [
13
+ "dist/node/module-runner.d.ts"
14
+ ]
15
+ }
16
+ },
17
+ "imports": {
18
+ "#module-sync-enabled": {
19
+ "module-sync": "./dist/vite/misc/true.js",
20
+ "default": "./dist/vite/misc/false.js"
21
+ },
22
+ "#types/*": "./dist/vite/types/*.d.ts",
23
+ "#dep-types/*": "./dist/vite/types/*.d.ts"
24
+ },
25
+ "exports": {
26
+ ".": "./dist/vite/node/index.js",
27
+ "./client": {
28
+ "types": "./dist/vite/client.d.ts"
29
+ },
30
+ "./dist/client/*": "./dist/vite/client/*",
31
+ "./internal": "./dist/vite/node/internal.js",
32
+ "./lib": {
33
+ "types": "./dist/tsdown/index-types.d.ts",
34
+ "default": "./dist/tsdown/index.js"
35
+ },
36
+ "./module-runner": "./dist/vite/node/module-runner.js",
37
+ "./package.json": "./package.json",
38
+ "./rolldown": {
39
+ "types": "./dist/rolldown/index.d.mts",
40
+ "default": "./dist/rolldown/index.mjs"
41
+ },
42
+ "./rolldown/config": {
43
+ "types": "./dist/rolldown/config.d.mts",
44
+ "default": "./dist/rolldown/config.mjs"
45
+ },
46
+ "./rolldown/experimental": {
47
+ "types": "./dist/rolldown/experimental-index.d.mts",
48
+ "default": "./dist/rolldown/experimental-index.mjs"
49
+ },
50
+ "./rolldown/experimental/runtime-types": {
51
+ "types": "./dist/rolldown/experimental-runtime-types.d.ts"
52
+ },
53
+ "./rolldown/filter": {
54
+ "types": "./dist/rolldown/filter-index.d.mts",
55
+ "default": "./dist/rolldown/filter-index.mjs"
56
+ },
57
+ "./rolldown/getLogFilter": {
58
+ "types": "./dist/rolldown/get-log-filter.d.mts",
59
+ "default": "./dist/rolldown/get-log-filter.mjs"
60
+ },
61
+ "./rolldown/parallelPlugin": {
62
+ "types": "./dist/rolldown/parallel-plugin.d.mts",
63
+ "default": "./dist/rolldown/parallel-plugin.mjs"
64
+ },
65
+ "./rolldown/parseAst": {
66
+ "types": "./dist/rolldown/parse-ast-index.d.mts",
67
+ "default": "./dist/rolldown/parse-ast-index.mjs"
68
+ },
69
+ "./rolldown/plugins": {
70
+ "types": "./dist/rolldown/plugins-index.d.mts",
71
+ "default": "./dist/rolldown/plugins-index.mjs"
72
+ },
73
+ "./rolldown/pluginutils": {
74
+ "types": "./dist/pluginutils/index.d.ts",
75
+ "default": "./dist/pluginutils/index.js"
76
+ },
77
+ "./rolldown/pluginutils/filter": {
78
+ "types": "./dist/pluginutils/filter/index.d.ts",
79
+ "default": "./dist/pluginutils/filter/index.js"
80
+ },
81
+ "./types/*": {
82
+ "types": "./dist/vite/types/*"
83
+ },
84
+ "./types/internal/*": null
85
+ },
86
+ "dependencies": {
87
+ "@oxc-project/runtime": "=0.112.0",
88
+ "@oxc-project/types": "=0.112.0",
89
+ "lightningcss": "^1.30.2",
90
+ "postcss": "^8.5.6"
91
+ },
92
+ "devDependencies": {
93
+ "@ast-grep/napi": "^0.40.4",
94
+ "@babel/generator": "^7.28.5",
95
+ "@babel/parser": "^7.28.5",
96
+ "@babel/types": "^7.28.5",
97
+ "@oxc-node/cli": "^0.0.35",
98
+ "@oxc-node/core": "^0.0.35",
99
+ "@vitejs/devtools": "^0.0.0-alpha.26",
100
+ "es-module-lexer": "^1.7.0",
101
+ "hookable": "^6.0.1",
102
+ "magic-string": "^0.30.21",
103
+ "oxc-parser": "=0.112.0",
104
+ "oxfmt": "^0.28.0",
105
+ "picocolors": "^1.1.1",
106
+ "picomatch": "^4.0.3",
107
+ "pkg-types": "^2.3.0",
108
+ "rolldown-plugin-dts": "^0.21.0",
109
+ "rollup": "^4.18.0",
110
+ "rollup-plugin-license": "^3.6.0",
111
+ "semver": "^7.7.3",
112
+ "tinyglobby": "^0.2.15",
113
+ "tree-kill": "^1.2.2",
114
+ "tsdown": "^0.20.2",
115
+ "rolldown": "1.0.0-rc.3",
116
+ "vite": "npm:@voidzero-dev/vite-plus-core@0.0.0-0bfcc90f.20260209-0731"
117
+ },
118
+ "peerDependencies": {
119
+ "@arethetypeswrong/core": "^0.18.1",
120
+ "@types/node": "^20.19.0 || >=22.12.0",
121
+ "@vitejs/devtools": "*",
122
+ "esbuild": "^0.27.0",
123
+ "jiti": ">=1.21.0",
124
+ "less": "^4.0.0",
125
+ "publint": "^0.3.0",
126
+ "sass": "^1.70.0",
127
+ "sass-embedded": "^1.70.0",
128
+ "stylus": ">=0.54.8",
129
+ "sugarss": "^5.0.0",
130
+ "terser": "^5.16.0",
131
+ "tsx": "^4.8.1",
132
+ "typescript": "^5.0.0",
133
+ "unplugin-lightningcss": "^0.4.0",
134
+ "unplugin-unused": "^0.5.0",
135
+ "yaml": "^2.4.2"
136
+ },
137
+ "peerDependenciesMeta": {
138
+ "@arethetypeswrong/core": {
139
+ "optional": true
140
+ },
141
+ "@vitejs/devtools": {
142
+ "optional": true
143
+ },
144
+ "publint": {
145
+ "optional": true
146
+ },
147
+ "typescript": {
148
+ "optional": true
149
+ },
150
+ "unplugin-lightningcss": {
151
+ "optional": true
152
+ },
153
+ "unplugin-unused": {
154
+ "optional": true
155
+ },
156
+ "@types/node": {
157
+ "optional": true
158
+ },
159
+ "esbuild": {
160
+ "optional": true
161
+ },
162
+ "jiti": {
163
+ "optional": true
164
+ },
165
+ "sass": {
166
+ "optional": true
167
+ },
168
+ "sass-embedded": {
169
+ "optional": true
170
+ },
171
+ "stylus": {
172
+ "optional": true
173
+ },
174
+ "less": {
175
+ "optional": true
176
+ },
177
+ "sugarss": {
178
+ "optional": true
179
+ },
180
+ "terser": {
181
+ "optional": true
182
+ },
183
+ "tsx": {
184
+ "optional": true
185
+ },
186
+ "yaml": {
187
+ "optional": true
188
+ }
189
+ },
190
+ "optionalDependencies": {
191
+ "fsevents": "~2.3.3"
192
+ },
193
+ "engines": {
194
+ "node": "^20.19.0 || >=22.12.0"
195
+ },
196
+ "bundledVersions": {
197
+ "vite": "8.0.0-beta.12",
198
+ "rolldown": "1.0.0-rc.3",
199
+ "tsdown": "0.20.2"
200
+ },
201
+ "scripts": {
202
+ "build": "oxnode -C dev ./build.ts"
203
+ }
204
+ }