vite-plugin-taro 0.5.14 → 0.6.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.
Files changed (60) hide show
  1. package/dist/node/plugins/client/client-taro.d.ts +2 -2
  2. package/dist/node/plugins/conditional/conditional-directives.d.ts +2 -2
  3. package/dist/node/plugins/h5/plugins.d.ts +2 -2
  4. package/dist/node/plugins/h5/resolver/module-resolver.d.ts +2 -2
  5. package/dist/node/plugins/h5/transform-app.d.ts +2 -2
  6. package/dist/node/plugins/h5/transform-app.js +2 -2
  7. package/dist/node/plugins/wx/dev/create-style-capture.d.ts +16 -4
  8. package/dist/node/plugins/wx/dev/create-style-capture.js +101 -53
  9. package/dist/node/plugins/wx/dev/dev-host.d.ts +2 -2
  10. package/dist/node/plugins/wx/dev/dev-host.js +13 -3
  11. package/dist/node/plugins/wx/dev/plugins.d.ts +2 -2
  12. package/dist/node/plugins/wx/dev/wx-dev-options.d.ts +2 -2
  13. package/dist/node/plugins/wx/output/files.d.ts +2 -2
  14. package/dist/node/plugins/wx/output/json.d.ts +3 -3
  15. package/dist/node/plugins/wx/output/json.js +1 -1
  16. package/dist/node/plugins/wx/output/templates.d.ts +2 -2
  17. package/dist/node/plugins/wx/plugins.d.ts +2 -2
  18. package/dist/node/plugins/wx/render/transport.js +1 -1
  19. package/dist/node/plugins/wx/resolve/resolver.d.ts +2 -2
  20. package/dist/node/plugins/wx/resolve/specialize-bootstrap.d.ts +2 -2
  21. package/dist/node/plugins/wx/resolve/specialize-bootstrap.js +1 -1
  22. package/dist/node/plugins/wx/resolve/specialize-page-capsule.d.ts +2 -2
  23. package/dist/node/plugins/wx/resolve/specialize-page-capsule.js +2 -2
  24. package/dist/node/utils/project-config.d.ts +2 -2
  25. package/dist/node/vpt.d.ts +4 -0
  26. package/dist/node/{vite-plugin.js → vpt.js} +1 -1
  27. package/dist/options.d.ts +65 -13
  28. package/dist/runtime/h5/app.js +2 -2
  29. package/dist/runtime/wx/amphibious/bootstrap.js +1 -1
  30. package/dist/runtime/wx/amphibious/transport.js +1 -1
  31. package/dist/runtime/wx/capsule/page.js +1 -1
  32. package/dist/vite.d.ts +2 -2
  33. package/dist/vite.js +1 -1
  34. package/package.json +3 -3
  35. package/src/node/plugins/client/client-taro.ts +3 -3
  36. package/src/node/plugins/conditional/conditional-directives.ts +3 -3
  37. package/src/node/plugins/h5/plugins.ts +3 -3
  38. package/src/node/plugins/h5/resolver/module-resolver.ts +2 -2
  39. package/src/node/plugins/h5/transform-app.ts +5 -5
  40. package/src/node/plugins/wx/dev/create-style-capture.ts +126 -57
  41. package/src/node/plugins/wx/dev/dev-host.ts +16 -5
  42. package/src/node/plugins/wx/dev/plugins.ts +2 -5
  43. package/src/node/plugins/wx/dev/wx-dev-options.ts +2 -2
  44. package/src/node/plugins/wx/output/files.ts +2 -2
  45. package/src/node/plugins/wx/output/json.ts +8 -8
  46. package/src/node/plugins/wx/output/templates.ts +3 -3
  47. package/src/node/plugins/wx/plugins.ts +3 -3
  48. package/src/node/plugins/wx/render/transport.ts +1 -1
  49. package/src/node/plugins/wx/resolve/resolver.ts +5 -5
  50. package/src/node/plugins/wx/resolve/specialize-bootstrap.ts +3 -3
  51. package/src/node/plugins/wx/resolve/specialize-page-capsule.ts +4 -4
  52. package/src/node/utils/project-config.ts +2 -2
  53. package/src/node/{vite-plugin.ts → vpt.ts} +2 -2
  54. package/src/options.ts +71 -13
  55. package/src/runtime/h5/app.ts +4 -4
  56. package/src/runtime/wx/amphibious/bootstrap.ts +2 -2
  57. package/src/runtime/wx/amphibious/transport.ts +2 -4
  58. package/src/runtime/wx/capsule/page.ts +3 -8
  59. package/src/vite.ts +2 -2
  60. package/dist/node/vite-plugin.d.ts +0 -4
@@ -1,5 +1,5 @@
1
1
  import type { Rolldown } from 'vite'
2
- import type { JsonObject, VitePluginTaroOptions, VitePluginTaroPageOption } from '../../../../options.ts'
2
+ import type { VptJsonObject, VptOptions, VptPageOption } from '../../../../options.ts'
3
3
  import { createAppConfig } from '../../../utils/project-config.ts'
4
4
  import type { GeneratedSubpackage } from '../placement/placer.ts'
5
5
  import { isGeneratedSubpackageFile } from '../placement/plan.ts'
@@ -11,7 +11,7 @@ export function createJsonAssets({
11
11
  subpackages,
12
12
  nativeComponents
13
13
  }: {
14
- options: VitePluginTaroOptions
14
+ options: VptOptions
15
15
  subpackages: readonly GeneratedSubpackage[]
16
16
  nativeComponents: readonly { name: string; componentPath: string }[]
17
17
  }): Rolldown.EmittedAsset[] {
@@ -29,15 +29,15 @@ export function createJsonAssets({
29
29
  ? [createJsonAsset('project.private.config.json', options.projectPrivateConfigJson)]
30
30
  : []),
31
31
 
32
- createJsonAsset('sitemap.json', options.sitemapJson)
32
+ ...(options.sitemapJson ? [createJsonAsset('sitemap.json', options.sitemapJson)] : [])
33
33
  ]
34
34
  }
35
35
 
36
36
  /** Creates Page JSON with generated Taro and native component registrations. */
37
37
  function createPageJson(
38
- page: VitePluginTaroPageOption,
38
+ page: VptPageOption,
39
39
  nativeComponents: readonly { name: string; componentPath: string }[]
40
- ): JsonObject {
40
+ ): VptJsonObject {
41
41
  const usingComponents = isJsonObject(page.config.usingComponents) ? page.config.usingComponents : {}
42
42
 
43
43
  // Cross-package components require a placeholder while WeChat downloads their generated subpackage. Paths are
@@ -60,17 +60,17 @@ function createPageJson(
60
60
  }
61
61
 
62
62
  /** Tests whether a configured JSON value can be merged as an object. */
63
- function isJsonObject(value: unknown): value is JsonObject {
63
+ function isJsonObject(value: unknown): value is VptJsonObject {
64
64
  return typeof value === 'object' && value !== null && !Array.isArray(value)
65
65
  }
66
66
 
67
67
  /** Serializes one native JSON object with stable formatting. */
68
- export function renderJson(value: JsonObject): string {
68
+ export function renderJson(value: VptJsonObject): string {
69
69
  return `${JSON.stringify(value, null, 4)}\n`
70
70
  }
71
71
 
72
72
  /** Creates one native JSON asset. */
73
- function createJsonAsset(fileName: string, value: JsonObject): Rolldown.EmittedAsset {
73
+ function createJsonAsset(fileName: string, value: VptJsonObject): Rolldown.EmittedAsset {
74
74
  return {
75
75
  type: 'asset',
76
76
  fileName,
@@ -1,7 +1,7 @@
1
1
  import { recursiveMerge } from '@tarojs/helper'
2
2
  import { Weapp as WxPlatform } from '@tarojs/plugin-platform-weapp'
3
3
  import type { Rolldown } from 'vite'
4
- import type { JsonObject, VitePluginTaroOptions } from '../../../../options.ts'
4
+ import type { VptJsonObject, VptOptions } from '../../../../options.ts'
5
5
  import { normalizeModuleId } from '../../../utils/modules.ts'
6
6
  import { packageRequire } from '../../../utils/packages.ts'
7
7
  import { renderJson } from './json.ts'
@@ -19,7 +19,7 @@ const taroComponentsModulePath = packageRequire.resolve('@tarojs/plugin-platform
19
19
  /** Creates Taro's shared WeChat templates and native WXML/WXSS companions for every Page. */
20
20
  export function createTemplateAssets(
21
21
  bundle: Rolldown.OutputBundle,
22
- options: VitePluginTaroOptions,
22
+ options: VptOptions,
23
23
  nativeComponents: readonly {
24
24
  name: string
25
25
  fields: readonly string[]
@@ -121,7 +121,7 @@ function toDashed(value: string): string {
121
121
  }
122
122
 
123
123
  /** Creates the recursive component configuration expected by Taro's templates. */
124
- function createComponentJson(): JsonObject {
124
+ function createComponentJson(): VptJsonObject {
125
125
  return {
126
126
  component: true,
127
127
  styleIsolation: 'apply-shared',
@@ -1,5 +1,5 @@
1
1
  import type { Plugin, PluginOption } from 'vite'
2
- import type { VitePluginTaroOptions } from '../../../options.ts'
2
+ import type { VptOptions } from '../../../options.ts'
3
3
  import { esTarget } from '../../utils/constant.ts'
4
4
  import { packageRequire } from '../../utils/packages.ts'
5
5
  import { clientTaroNativeId } from '../client/constant.ts'
@@ -18,7 +18,7 @@ import { createWxStylePlugins } from './styles/plugins.ts'
18
18
  type WxResolver = ReturnType<typeof createResolver>
19
19
 
20
20
  /** Creates the complete plugin set for the wx target. */
21
- export function createWxTargetPlugins(options: VitePluginTaroOptions): PluginOption[] {
21
+ export function createWxTargetPlugins(options: VptOptions): PluginOption[] {
22
22
  const resolver = createResolver(options)
23
23
 
24
24
  // Reuse the resolver instance's ordered application subset. Rolldown's complete input also contains bootstrap, transport,
@@ -31,7 +31,7 @@ export function createWxTargetPlugins(options: VitePluginTaroOptions): PluginOpt
31
31
  }
32
32
 
33
33
  /** Configures the complete wx target build pipeline. */
34
- function createWxPlugin(options: VitePluginTaroOptions, resolver: WxResolver): Plugin {
34
+ function createWxPlugin(options: VptOptions, resolver: WxResolver): Plugin {
35
35
  const placer = createPlacer()
36
36
 
37
37
  return {
@@ -4,7 +4,7 @@ import type { Rolldown } from 'vite'
4
4
  import { type AstTransformResult, replaceWithAst } from '../../../utils/transform.ts'
5
5
  import { getWxExecutionKind } from '../module.ts'
6
6
 
7
- const transportPlaceholder = '__VITE_PLUGIN_TARO_TRANSPORT__'
7
+ const transportPlaceholder = '__VPT_TRANSPORT__'
8
8
  const moduleIdParameter = 'moduleId'
9
9
  const exportBindingParameter = 'exportBinding'
10
10
 
@@ -1,5 +1,5 @@
1
1
  import { normalizePath } from 'vite'
2
- import type { VitePluginTaroOptions, VitePluginTaroPageOption } from '../../../../options.ts'
2
+ import type { VptOptions, VptPageOption } from '../../../../options.ts'
3
3
  import { normalizeModuleId, resolveAppComponentPath, resolvePageComponentPath } from '../../../utils/modules.ts'
4
4
  import { createAppConfig } from '../../../utils/project-config.ts'
5
5
  import { appComponentId } from '../../client/constant.ts'
@@ -25,7 +25,7 @@ import { specializePageCapsule } from './specialize-page-capsule.ts'
25
25
  type PrivateIdResolver = (importer: string | undefined, projectRoot: string) => string
26
26
 
27
27
  /** Creates the resolver and source specializer for the wx module graph. */
28
- export function createResolver(options: VitePluginTaroOptions) {
28
+ export function createResolver(options: VptOptions) {
29
29
  const normalizedBootstrapPath = normalizePath(bootstrapPath)
30
30
  const normalizedPageCapsulePath = normalizePath(pageCapsulePath)
31
31
 
@@ -87,7 +87,7 @@ export function createResolver(options: VitePluginTaroOptions) {
87
87
  }
88
88
 
89
89
  /** Declares output entries and the ordered application subset that can own user styles. */
90
- function createEntryGraph(pages: readonly VitePluginTaroPageOption[]) {
90
+ function createEntryGraph(pages: readonly VptPageOption[]) {
91
91
  const pageEntries = pages.map((page) => {
92
92
  return {
93
93
  capsuleId: createRouteModuleId({ moduleId: pageCapsulePath, pagePath: page.path }),
@@ -128,8 +128,8 @@ function requireConfiguredPage({
128
128
  pageByPath
129
129
  }: {
130
130
  moduleId: string | undefined
131
- pageByPath: ReadonlyMap<string, VitePluginTaroPageOption>
132
- }): VitePluginTaroPageOption {
131
+ pageByPath: ReadonlyMap<string, VptPageOption>
132
+ }): VptPageOption {
133
133
  const queryIndex = moduleId?.indexOf('?') ?? -1
134
134
  const pagePath = queryIndex === -1 ? undefined : new URLSearchParams(moduleId?.slice(queryIndex + 1)).get('route')
135
135
  const page = pagePath ? pageByPath.get(pagePath) : undefined
@@ -1,8 +1,8 @@
1
1
  import { types } from '@babel/core'
2
- import type { JsonObject } from '../../../../options.ts'
2
+ import type { VptJsonObject } from '../../../../options.ts'
3
3
  import { type AstTransformResult, replaceWithAst } from '../../../utils/transform.ts'
4
4
 
5
- const appConfigPlaceholder = '__VITE_PLUGIN_TARO_APP_CONFIG__'
5
+ const appConfigPlaceholder = '__VPT_APP_CONFIG__'
6
6
 
7
7
  /** Specializes the amphibious bootstrap with the shared App configuration. */
8
8
  export function specializeBootstrap({
@@ -13,7 +13,7 @@ export function specializeBootstrap({
13
13
  }: {
14
14
  code: string
15
15
  id: string
16
- appConfig: JsonObject
16
+ appConfig: VptJsonObject
17
17
  sourcemap?: boolean
18
18
  }): Promise<AstTransformResult> {
19
19
  return replaceWithAst(
@@ -1,9 +1,9 @@
1
1
  import { types } from '@babel/core'
2
- import type { VitePluginTaroPageOption } from '../../../../options.ts'
2
+ import type { VptPageOption } from '../../../../options.ts'
3
3
  import { type AstTransformResult, replaceWithAst } from '../../../utils/transform.ts'
4
4
 
5
- const pagePathPlaceholder = '__VITE_PLUGIN_TARO_PAGE_PATH__'
6
- const pageConfigPlaceholder = '__VITE_PLUGIN_TARO_PAGE_CONFIG__'
5
+ const pagePathPlaceholder = '__VPT_PAGE_PATH__'
6
+ const pageConfigPlaceholder = '__VPT_PAGE_CONFIG__'
7
7
 
8
8
  /** Specializes the Page capsule for one configured route. */
9
9
  export function specializePageCapsule({
@@ -14,7 +14,7 @@ export function specializePageCapsule({
14
14
  }: {
15
15
  code: string
16
16
  id: string
17
- page: VitePluginTaroPageOption
17
+ page: VptPageOption
18
18
  sourcemap?: boolean
19
19
  }): Promise<AstTransformResult> {
20
20
  return replaceWithAst(
@@ -1,7 +1,7 @@
1
- import type { JsonObject, VitePluginTaroOptions } from '../../options.ts'
1
+ import type { VptJsonObject, VptOptions } from '../../options.ts'
2
2
 
3
3
  /** Creates shared App configuration with configured Page order as the authoritative value. */
4
- export function createAppConfig(options: VitePluginTaroOptions): JsonObject {
4
+ export function createAppConfig(options: VptOptions): VptJsonObject {
5
5
  const { subPackages: _subPackages, subpackages: _subpackages, ...appJson } = options.appJson
6
6
  return {
7
7
  ...appJson,
@@ -1,13 +1,13 @@
1
1
  import react from '@vitejs/plugin-react'
2
2
  import type { PluginOption } from 'vite'
3
- import type { VitePluginTaroOptions } from '../options.ts'
3
+ import type { VptOptions } from '../options.ts'
4
4
  import { createClientTaroPlugin } from './plugins/client/client-taro.ts'
5
5
  import { createConditionalDirectivePlugin } from './plugins/conditional/conditional-directives.ts'
6
6
  import { createH5TargetPlugins } from './plugins/h5/plugins.ts'
7
7
  import { createWxTargetPlugins } from './plugins/wx/plugins.ts'
8
8
 
9
9
  /** Creates the Vite plugins for one Taro target. */
10
- export default function vitePluginTaro(options: VitePluginTaroOptions): PluginOption[] {
10
+ export default function vpt(options: VptOptions): PluginOption[] {
11
11
  return [
12
12
  createConditionalDirectivePlugin(options.target),
13
13
  createClientTaroPlugin(options.target),
package/src/options.ts CHANGED
@@ -1,24 +1,82 @@
1
1
  /** A JSON object used by generated target configs. */
2
- export type JsonObject = Record<string, unknown>
2
+ export type VptJsonObject = Record<string, unknown>
3
3
 
4
4
  /** Build target handled by this plugin. */
5
- export type VitePluginTaroTarget = 'wx' | 'h5'
5
+ export type VptTarget = 'wx' | 'h5'
6
6
 
7
7
  /** Configures one Taro page. */
8
- export type VitePluginTaroPageOption = {
9
- /** Taro route and output path without a file extension. */
8
+ export type VptPageOption = {
9
+ /**
10
+ * Taro route and output path without a file extension.
11
+ *
12
+ * The plugin resolves the page component from `src/${path}.tsx`, relative to the Vite project root. For example,
13
+ * `pages/home/index` resolves to `src/pages/home/index.tsx` and is emitted under `pages/home/index` for `wx`.
14
+ */
10
15
  path: string
11
16
 
12
- config: JsonObject
17
+ /**
18
+ * Target-independent Taro page configuration.
19
+ *
20
+ * For `wx`, these values form the generated `<path>.json`; the plugin augments `usingComponents` with its generated
21
+ * component registrations. For `h5`, the values are added to the corresponding Taro router entry.
22
+ */
23
+ config: VptJsonObject
13
24
  }
14
25
 
15
- /** Configures the Vite Taro plugin. */
16
- export interface VitePluginTaroOptions {
17
- target: VitePluginTaroTarget
26
+ /** Configures vpt for one build target. */
27
+ export interface VptOptions {
28
+ /**
29
+ * Platform produced by the current Vite invocation.
30
+ *
31
+ * Use `wx` to emit a WeChat Mini Program or `h5` to emit a browser application. The selected target controls Taro
32
+ * module resolution, conditional compilation, runtime bootstrapping, style processing, and output generation.
33
+ */
34
+ target: VptTarget
35
+
36
+ /**
37
+ * Source module that default-exports the root React application component.
38
+ *
39
+ * Relative paths are resolved from Vite's project root, for example `src/app.tsx`. The component wraps the active
40
+ * page through its `children` prop and is the appropriate place to import application-wide styles.
41
+ */
18
42
  app: string
19
- pages: VitePluginTaroPageOption[]
20
- appJson: JsonObject
21
- projectConfigJson: JsonObject
22
- projectPrivateConfigJson?: JsonObject
23
- sitemapJson: JsonObject
43
+
44
+ /**
45
+ * Complete ordered list of application pages.
46
+ *
47
+ * The declared order becomes the `pages` order in the generated `app.json`, the H5 route order, and the Page order
48
+ * in the application style cascade. Each Page source is resolved according to its `path`.
49
+ */
50
+ pages: VptPageOption[]
51
+
52
+ /**
53
+ * Target-independent Taro application configuration.
54
+ *
55
+ * For `wx`, these values form the generated `app.json`. For `h5`, they configure the Taro application and router.
56
+ * The plugin always derives `pages` from {@link pages}; caller-provided `pages`, `subPackages`, and `subpackages`
57
+ * values are discarded because the build pipeline owns page order and generated package placement.
58
+ */
59
+ appJson: VptJsonObject
60
+
61
+ /**
62
+ * WeChat DevTools project configuration written to `project.config.json` without merging.
63
+ *
64
+ * This option is required so one configuration shape can be shared between targets, but it is only emitted for a
65
+ * `wx` build and is ignored for `h5`.
66
+ */
67
+ projectConfigJson: VptJsonObject
68
+
69
+ /**
70
+ * Local WeChat DevTools overrides written to `project.private.config.json` without merging.
71
+ *
72
+ * The file is emitted only when this value is provided for a `wx` build. It is ignored for `h5`.
73
+ */
74
+ projectPrivateConfigJson?: VptJsonObject
75
+
76
+ /**
77
+ * WeChat Mini Program indexing rules written to `sitemap.json` without merging.
78
+ *
79
+ * The file is emitted only when this value is provided for a `wx` build. It is ignored for `h5`.
80
+ */
81
+ sitemapJson?: VptJsonObject
24
82
  }
@@ -8,16 +8,16 @@ import ReactDOM from 'react-dom/client'
8
8
  // @ts-expect-error: The H5 build resolves this private App component.
9
9
  import AppComponent from '\0vpt:app-component'
10
10
 
11
- declare const __VITE_PLUGIN_TARO_H5_APP_CONFIG__: SpaRouterConfig
12
- declare const __VITE_PLUGIN_TARO_H5_ROUTES__: Route[]
11
+ declare const __VPT_H5_APP_CONFIG__: SpaRouterConfig
12
+ declare const __VPT_H5_ROUTES__: Route[]
13
13
 
14
14
  const browserWindow = window as unknown as Window &
15
15
  typeof window & {
16
16
  __taroAppConfig: SpaRouterConfig
17
17
  }
18
- const config = __VITE_PLUGIN_TARO_H5_APP_CONFIG__
18
+ const config = __VPT_H5_APP_CONFIG__
19
19
  browserWindow.__taroAppConfig = config
20
- config.routes = __VITE_PLUGIN_TARO_H5_ROUTES__
20
+ config.routes = __VPT_H5_ROUTES__
21
21
  const app = createReactApp(AppComponent, React, ReactDOM, config)
22
22
  const history = createHashHistory({ window: browserWindow })
23
23
  handleAppMount(config, history)
@@ -2,10 +2,10 @@
2
2
  import '../systemjs/system-core.js'
3
3
  import { transport } from './transport.ts'
4
4
 
5
- declare const __VITE_PLUGIN_TARO_APP_CONFIG__: Record<string, unknown>
5
+ declare const __VPT_APP_CONFIG__: Record<string, unknown>
6
6
 
7
7
  /** Shares one App configuration object between the specialized bootstrap and App capsule. */
8
- export const appConfig = __VITE_PLUGIN_TARO_APP_CONFIG__
8
+ export const appConfig = __VPT_APP_CONFIG__
9
9
 
10
10
  // WX has no modulepreload transport. Genuine application import() boundaries retain System.import() and may load
11
11
  // asynchronous subpackage or top-level-await graphs through this identity wrapper.
@@ -2,9 +2,7 @@
2
2
  // amphibious boundary that publishes native namespaces to SystemJS without re-evaluating their module bodies.
3
3
 
4
4
  /** Materialized from the preliminary output graph before Rolldown finalizes content hashes. */
5
- declare const __VITE_PLUGIN_TARO_TRANSPORT__: (
6
- moduleId: string
7
- ) => System.Registration | PromiseLike<System.Registration>
5
+ declare const __VPT_TRANSPORT__: (moduleId: string) => System.Registration | PromiseLike<System.Registration>
8
6
 
9
7
  /** Dispatches to one generated literal require and bridges amphibious CommonJS namespaces inline. */
10
- export const transport = __VITE_PLUGIN_TARO_TRANSPORT__
8
+ export const transport = __VPT_TRANSPORT__
@@ -5,14 +5,9 @@ import './app.ts'
5
5
  import PageComponent from '\0vpt:page-component'
6
6
  import { createPageConfig } from './taro-runtime.ts'
7
7
 
8
- declare const __VITE_PLUGIN_TARO_PAGE_PATH__: string
9
- declare const __VITE_PLUGIN_TARO_PAGE_CONFIG__: Record<string, unknown>
8
+ declare const __VPT_PAGE_PATH__: string
9
+ declare const __VPT_PAGE_CONFIG__: Record<string, unknown>
10
10
 
11
- const config = createPageConfig(
12
- PageComponent,
13
- __VITE_PLUGIN_TARO_PAGE_PATH__,
14
- { root: { cn: [] } },
15
- __VITE_PLUGIN_TARO_PAGE_CONFIG__
16
- )
11
+ const config = createPageConfig(PageComponent, __VPT_PAGE_PATH__, { root: { cn: [] } }, __VPT_PAGE_CONFIG__)
17
12
 
18
13
  export default config
package/src/vite.ts CHANGED
@@ -1,2 +1,2 @@
1
- export { default } from './node/vite-plugin.ts'
2
- export type { VitePluginTaroOptions, VitePluginTaroPageOption, VitePluginTaroTarget } from './options.ts'
1
+ export { default } from './node/vpt.ts'
2
+ export type { VptJsonObject, VptOptions, VptPageOption, VptTarget } from './options.ts'
@@ -1,4 +0,0 @@
1
- import type { PluginOption } from 'vite';
2
- import type { VitePluginTaroOptions } from '../options.ts';
3
- /** Creates the Vite plugins for one Taro target. */
4
- export default function vitePluginTaro(options: VitePluginTaroOptions): PluginOption[];