vite-plugin-taro 0.0.6 → 0.1.1

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 (3) hide show
  1. package/README.en.md +13 -4
  2. package/README.md +13 -4
  3. package/package.json +4 -4
package/README.en.md CHANGED
@@ -5,11 +5,20 @@
5
5
 
6
6
  [简体中文](README.md) | English
7
7
 
8
- Build WeChat Mini Apps with the latest standard frontend stack: Vite 8, React 19, and Tailwind CSS v4.
8
+ Build WeChat Mini Apps with the latest standards-based frontend stack: Vite 8, React 19, and Tailwind CSS v4.
9
9
 
10
- `vite-plugin-taro` is for applications that want Taro's cross-platform React components and APIs, but prefer Vite/Rolldown instead of Taro's webpack runner. The plugin generates app/page entries, target runtime aliases, H5 router bootstrap, WeChat companion files, Tailwind processing, and conditional compilation for you.
10
+ `vite-plugin-taro` is for applications that want Taro's cross-platform React components and APIs, but prefer Vite instead of Taro webpack. The plugin generates app/page entries, target runtime aliases, H5 router bootstrap, WeChat companion files, Tailwind processing, and conditional compilation for you.
11
11
 
12
- Live demo: <https://sep2.github.io/vite-plugin-taro>. See [Sample app](#sample-app) how to run it locally.
12
+ Live demo: <https://sep2.github.io/vite-plugin-taro>. See [Sample app](https://github.com/sep2/vite-plugin-taro/tree/main/packages/loan-genius/README.en.md) how to run it locally.
13
+
14
+ - **One codebase, two targets** Build H5 and WeChat Mini Program outputs from shared React/Taro pages.
15
+ - **Native Vite builds** Use standard Vite 8 config instead of legacy webpack configuration, with support for all Vite plugins.
16
+ - **Hot reload** Both H5 and WeChat Mini Program support dev-mode watch, with Vite 8 HMR/rebuilds for fast feedback.
17
+ - **Battle-tested Taro foundation** Use the full set of Taro APIs and components instead of reinventing cross-platform primitives.
18
+ - **Tailwind ready** Built-in Tailwind CSS v4 support for both H5 and WeChat Mini Program styles.
19
+ - **Conditional compilation** Use Taro-style `#ifdef` / `#ifndef` / `#if` blocks to split code and styles by `h5` / `wx` target.
20
+ - **Type-friendly** Import Taro capabilities consistently through `virtual:taro/api` and `virtual:taro/components`, with TypeScript type support.
21
+ - **WeChat Skyline** Support WeChat Mini Program output with Skyline rendering mode.
13
22
 
14
23
  ## Install
15
24
 
@@ -310,7 +319,7 @@ For `target: 'h5'`, the plugin injects a generated module into `index.html`, imp
310
319
 
311
320
  ### WeChat Mini Program
312
321
 
313
- For `target: 'wx'`, the plugin configures Vite/Rolldown to emit WeChat-compatible CommonJS chunks and Mini Program companion files.
322
+ For `target: 'wx'`, the plugin configures Vite to emit WeChat-compatible CommonJS chunks and Mini Program companion files.
314
323
 
315
324
  Typical output:
316
325
 
package/README.md CHANGED
@@ -5,11 +5,20 @@
5
5
 
6
6
  简体中文 | [English](README.en.md)
7
7
 
8
- 使用最新标准前端技术栈 Vite 8、React 19 和 Tailwind CSS v4 构建微信小程序。
8
+ 使用最新标准化前端技术栈 Vite 8、React 19 和 Tailwind CSS v4 构建微信小程序。
9
9
 
10
- `vite-plugin-taro` 适用于希望使用 Taro 跨平台 React 组件和 API,但更偏好 Vite/Rolldown 而非 Taro webpack 构建器的应用。插件会为你生成应用/页面入口、目标运行时别名、H5 路由启动代码、微信端配套文件、Tailwind 处理,以及条件编译。
10
+ `vite-plugin-taro` 适用于希望使用 Taro 跨平台 React 组件和 API,但更偏好 Vite 而非 Taro webpack 的应用。插件会为你生成应用/页面入口、目标运行时别名、H5 路由启动代码、微信端配套文件、Tailwind 处理,以及条件编译。
11
11
 
12
- 在线演示:<https://sep2.github.io/vite-plugin-taro>。如何在本地运行,请参见[示例应用](#示例应用)。
12
+ 在线演示:<https://sep2.github.io/vite-plugin-taro>。如何在本地运行,请参见[示例应用](https://github.com/sep2/vite-plugin-taro/tree/main/packages/loan-genius/README.md)。
13
+
14
+ - **一套代码,双端输出** 同一套 React/Taro 页面构建 H5 与微信小程序。
15
+ - **原生 Vite 构建** 使用标准 Vite 8 配置,无需维护老旧的 webpack 配置,并支持所有 Vite 插件。
16
+ - **热更新** H5 与微信小程序都支持开发模式 watch,基于 Vite 8 热更新/快速重建即时预览。
17
+ - **依托成熟 Taro 能力** 复用久经实战检验的 Taro API 和组件,完整使用 Taro 跨端能力。
18
+ - **Tailwind 就绪** 内置 Tailwind CSS v4 支持,H5 与微信小程序样式开箱即用。
19
+ - **条件编译** 支持 Taro 风格 `#ifdef` / `#ifndef` / `#if`,可按 `h5` / `wx` 裁剪代码和样式。
20
+ - **类型友好** 通过 `virtual:taro/api` 和 `virtual:taro/components` 统一导入 Taro 能力,并提供 TypeScript 类型支持。
21
+ - **微信 Skyline** 支持微信小程序 Skyline 渲染模式输出。
13
22
 
14
23
  ## 安装
15
24
 
@@ -310,7 +319,7 @@ console.log('fallback')
310
319
 
311
320
  ### 微信小程序
312
321
 
313
- 对于 `target: 'wx'`,插件会配置 Vite/Rolldown,输出微信兼容的 CommonJS chunk 和小程序配套文件。
322
+ 对于 `target: 'wx'`,插件会配置 Vite,输出微信兼容的 CommonJS chunk 和小程序配套文件。
314
323
 
315
324
  典型输出:
316
325
 
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "vite-plugin-taro",
3
- "version": "0.0.6",
3
+ "version": "0.1.1",
4
+ "author": "sep2",
4
5
  "description": "Vite 8 plugin for building one React/Taro codebase for WeChat Mini Program and H5 targets.",
5
6
  "type": "module",
6
7
  "repository": {
@@ -41,7 +42,6 @@
41
42
  "mini-program",
42
43
  "react"
43
44
  ],
44
- "author": "felix",
45
45
  "license": "MIT",
46
46
  "publishConfig": {
47
47
  "access": "public"
@@ -64,8 +64,8 @@
64
64
  "babel-plugin-transform-taroapi": "^4.2.0",
65
65
  "tailwindcss": "^4.3.1",
66
66
  "weapp-tailwindcss": "^5.0.13",
67
- "@tarojs/plugin-framework-react": "npm:vite-plugin-taro-plugin-framework-react@4.2.0-react19.5",
68
- "@tarojs/react": "npm:vite-plugin-taro-react@4.2.0-react19.5"
67
+ "@tarojs/react": "npm:vite-plugin-taro-react@0.1.1",
68
+ "@tarojs/plugin-framework-react": "npm:vite-plugin-taro-plugin-framework-react@0.1.1"
69
69
  },
70
70
  "peerDependencies": {
71
71
  "react": "^19.0.0",