create-weapp-vite 2.8.4 → 2.8.6
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/README.md +1 -1
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/dist/{src-CPv1LUNQ.js → src-Dj2WhZkT.js} +26 -17
- package/package.json +3 -3
- package/templates/default/README.md +1 -1
- package/templates/default/src/app.json +1 -1
- package/templates/default/src/components/HelloWorld/HelloWorld.json +1 -1
- package/templates/default/src/layouts/admin/index.json +1 -1
- package/templates/default/src/layouts/default/index.json +1 -1
- package/templates/default/src/pages/index/index.json +1 -1
- package/templates/default/src/pages/index/index.ts +2 -2
- package/templates/default/src/pages/layouts/index.json +1 -1
- package/templates/default/src/sitemap.json +1 -1
- package/templates/default/src/theme.json +1 -1
- package/templates/default/weapp-vite.config.ts +1 -1
- package/templates/lib/README.md +1 -1
- package/templates/lib/src/app.json +1 -1
- package/templates/lib/src/components/HelloWorld/HelloWorld.json +1 -1
- package/templates/lib/src/layouts/admin/index.json +1 -1
- package/templates/lib/src/layouts/default/index.json +1 -1
- package/templates/lib/src/pages/index/index.json +1 -1
- package/templates/lib/src/pages/index/index.ts +2 -2
- package/templates/lib/src/pages/layouts/index.json +1 -1
- package/templates/lib/src/sitemap.json +1 -1
- package/templates/lib/src/theme.json +1 -1
- package/templates/lib/weapp-vite.config.ts +1 -1
- package/templates/multi-platform/README.md +1 -1
- package/templates/multi-platform/src/app.json +1 -1
- package/templates/multi-platform/src/components/PlatformCard/index.json +1 -1
- package/templates/multi-platform/src/pages/index/index.json +1 -1
- package/templates/multi-platform/src/sitemap.json +1 -1
- package/templates/multi-platform-sfc/README.md +1 -1
- package/templates/plugin/README.md +2 -2
- package/templates/plugin/plugin/components/native-meter/index.json +1 -1
- package/templates/plugin/plugin/pages/native-playground/index.json +1 -1
- package/templates/plugin/plugin/plugin.json +1 -1
- package/templates/plugin/src/app.json +1 -1
- package/templates/plugin/src/pages/index/index.json +1 -1
- package/templates/plugin/src/sitemap.json +1 -1
- package/templates/react/package.json +4 -4
- package/templates/tailwindcss/README.md +1 -1
- package/templates/tailwindcss/package.json +0 -1
- package/templates/tailwindcss/src/app.json +1 -1
- package/templates/tailwindcss/src/components/HelloWorld/HelloWorld.json +1 -1
- package/templates/tailwindcss/src/layouts/admin/index.json +1 -1
- package/templates/tailwindcss/src/layouts/default/index.json +1 -1
- package/templates/tailwindcss/src/pages/index/index.json +1 -1
- package/templates/tailwindcss/src/pages/index/index.ts +2 -2
- package/templates/tailwindcss/src/pages/index/index.wxml +4 -4
- package/templates/tailwindcss/src/pages/layouts/index.json +1 -1
- package/templates/tailwindcss/src/pages/profile/index.json +1 -1
- package/templates/tailwindcss/src/pages/profile/index.ts +2 -2
- package/templates/tailwindcss/src/sitemap.json +1 -1
- package/templates/tailwindcss/src/theme.json +1 -1
- package/templates/tailwindcss/weapp-vite.config.ts +5 -9
- package/templates/tdesign/README.md +1 -1
- package/templates/tdesign/package.json +0 -1
- package/templates/tdesign/src/app.json +1 -1
- package/templates/tdesign/src/components/HelloWorld/HelloWorld.json +1 -1
- package/templates/tdesign/src/components/HelloWorld/HelloWorld.wxml +2 -2
- package/templates/tdesign/src/layouts/admin/index.json +1 -1
- package/templates/tdesign/src/layouts/default/index.json +1 -1
- package/templates/tdesign/src/pages/index/index.json +1 -1
- package/templates/tdesign/src/pages/index/index.ts +2 -2
- package/templates/tdesign/src/pages/index/index.wxml +2 -2
- package/templates/tdesign/src/pages/layouts/index.json +1 -1
- package/templates/tdesign/src/sitemap.json +1 -1
- package/templates/tdesign/src/theme.json +1 -1
- package/templates/tdesign/weapp-vite.config.ts +5 -9
- package/templates/vant/README.md +1 -1
- package/templates/vant/package.json +0 -1
- package/templates/vant/src/app.json +1 -1
- package/templates/vant/src/components/HelloWorld/HelloWorld.json +1 -1
- package/templates/vant/src/layouts/admin/index.json +1 -1
- package/templates/vant/src/layouts/default/index.json +1 -1
- package/templates/vant/src/pages/index/index.json +1 -1
- package/templates/vant/src/pages/index/index.ts +2 -2
- package/templates/vant/src/pages/index/index.wxml +4 -4
- package/templates/vant/src/pages/layouts/index.json +1 -1
- package/templates/vant/src/sitemap.json +1 -1
- package/templates/vant/src/theme.json +1 -1
- package/templates/vant/weapp-vite.config.ts +5 -9
- package/templates/wevu/README.md +2 -2
- package/templates/wevu/src/sitemap.json +1 -1
- package/templates/wevu/src/theme.json +1 -1
- package/templates/wevu-tdesign/README.md +2 -2
- package/templates/wevu-tdesign/package.json +0 -1
- package/templates/wevu-tdesign/src/sitemap.json +1 -1
- package/templates/wevu-tdesign/src/theme.json +1 -1
- package/templates/wevu-tdesign/weapp-vite.config.ts +5 -8
package/README.md
CHANGED
package/dist/cli.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as RECOMMENDED_SKILLS_INSTALL_COMMAND, t as createProject } from "./src-
|
|
1
|
+
import { n as RECOMMENDED_SKILLS_INSTALL_COMMAND, t as createProject } from "./src-Dj2WhZkT.js";
|
|
2
2
|
import logger from "@weapp-core/logger";
|
|
3
3
|
import { fs } from "@weapp-core/shared/fs";
|
|
4
4
|
import process from "node:process";
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { r as TemplateName, t as createProject } from "./src-
|
|
1
|
+
import { r as TemplateName, t as createProject } from "./src-Dj2WhZkT.js";
|
|
2
2
|
export { TemplateName, createProject };
|
|
@@ -6,19 +6,19 @@ import https from "node:https";
|
|
|
6
6
|
import { spawn } from "node:child_process";
|
|
7
7
|
import process from "node:process";
|
|
8
8
|
//#region ../../packages-runtime/react/package.json
|
|
9
|
-
var version$4 = "0.2.
|
|
9
|
+
var version$4 = "0.2.2";
|
|
10
10
|
//#endregion
|
|
11
11
|
//#region ../../packages-runtime/wevu/package.json
|
|
12
|
-
var version$3 = "6.
|
|
12
|
+
var version$3 = "6.25.0";
|
|
13
13
|
//#endregion
|
|
14
14
|
//#region ../dashboard/package.json
|
|
15
|
-
var version$2 = "6.
|
|
15
|
+
var version$2 = "6.25.0";
|
|
16
16
|
//#endregion
|
|
17
17
|
//#region ../eslint/package.json
|
|
18
|
-
var version$1 = "0.2.
|
|
18
|
+
var version$1 = "0.2.2";
|
|
19
19
|
//#endregion
|
|
20
20
|
//#region ../weapp-vite/package.json
|
|
21
|
-
var version = "6.
|
|
21
|
+
var version = "6.25.0";
|
|
22
22
|
//#endregion
|
|
23
23
|
//#region src/enums.ts
|
|
24
24
|
let TemplateName = /* @__PURE__ */ function(TemplateName) {
|
|
@@ -138,13 +138,15 @@ const TEMPLATE_CATALOG = {
|
|
|
138
138
|
"@iconify/tailwind4": "^1.2.3",
|
|
139
139
|
"@mini-types/alipay": "^3.0.14",
|
|
140
140
|
"@tailwindcss/vite": "^4.3.3",
|
|
141
|
-
"@types/node": "^26.
|
|
141
|
+
"@types/node": "^26.4.0",
|
|
142
|
+
"@types/react": "19.2.18",
|
|
143
|
+
"@types/react-reconciler": "0.33.0",
|
|
142
144
|
"@types/semver": "^7.8.0",
|
|
143
145
|
"@vant/weapp": "^1.11.7",
|
|
144
146
|
"@vitejs/plugin-vue": "^6.0.8",
|
|
145
147
|
"@vue/babel-plugin-jsx": "3.0.0",
|
|
146
|
-
"@vue/compiler-core": "^3.5.
|
|
147
|
-
"@vue/compiler-dom": "^3.5.
|
|
148
|
+
"@vue/compiler-core": "^3.5.42",
|
|
149
|
+
"@vue/compiler-dom": "^3.5.42",
|
|
148
150
|
"@vue/language-core": "^3.3.11",
|
|
149
151
|
"@wot-ui/ui": "2.3.2",
|
|
150
152
|
"antd-mini": "^3.4.3",
|
|
@@ -153,14 +155,18 @@ const TEMPLATE_CATALOG = {
|
|
|
153
155
|
"comment-json": "^5.0.0",
|
|
154
156
|
"estree-walker": "^3.0.3",
|
|
155
157
|
"gm-crypto": "^0.1.12",
|
|
156
|
-
"
|
|
158
|
+
"graphql-request": "^7.4.0",
|
|
159
|
+
"happy-dom": "^20.11.12",
|
|
157
160
|
"lru-cache": "^11.5.2",
|
|
158
|
-
"magic-string": "^1.2.
|
|
161
|
+
"magic-string": "^1.2.3",
|
|
159
162
|
"miniprogram-api-typings": "^5.2.3",
|
|
160
163
|
"oxc-parser": "^0.147.0",
|
|
161
164
|
"oxc-walker": "^1.1.1",
|
|
162
165
|
"pkg-types": "^2.3.1",
|
|
166
|
+
"postcss-selector-parser": "^7.1.5",
|
|
167
|
+
"react-reconciler": "0.33.0",
|
|
163
168
|
"sass-embedded": "^1.103.1",
|
|
169
|
+
"socket.io-client": "^4.8.3",
|
|
164
170
|
"tailwind-merge": "^3.6.0",
|
|
165
171
|
"tailwind-variants": "^3.3.1",
|
|
166
172
|
"tdesign-miniprogram": "^1.16.0",
|
|
@@ -168,8 +174,9 @@ const TEMPLATE_CATALOG = {
|
|
|
168
174
|
"uview-plus": "3.8.112",
|
|
169
175
|
"vite-plugin-inspect": "^12.0.2",
|
|
170
176
|
"vue-tsc": "^3.3.11",
|
|
171
|
-
"weapp-tailwindcss": "^5.
|
|
177
|
+
"weapp-tailwindcss": "^5.4.1",
|
|
172
178
|
autoprefixer: "^10.5.4",
|
|
179
|
+
axios: "^1.20.0",
|
|
173
180
|
clsx: "^2.1.1",
|
|
174
181
|
dayjs: "^1.11.23",
|
|
175
182
|
echarts: "^6.1.0",
|
|
@@ -181,21 +188,24 @@ const TEMPLATE_CATALOG = {
|
|
|
181
188
|
merge: "^2.1.1",
|
|
182
189
|
obug: "^2.1.4",
|
|
183
190
|
pathe: "^2.0.3",
|
|
191
|
+
picocolors: "^1.1.1",
|
|
184
192
|
postcss: "^8.5.26",
|
|
185
|
-
|
|
193
|
+
react: "19.2.8",
|
|
194
|
+
rolldown: "1.2.6",
|
|
186
195
|
sass: "^1.103.1",
|
|
196
|
+
sharp: "^0.35.4",
|
|
187
197
|
stylelint: "^17.14.1",
|
|
188
198
|
tailwindcss: "^4.3.3",
|
|
189
199
|
tslib: "^2.8.1",
|
|
190
200
|
tsx: "^4.23.12",
|
|
191
201
|
typescript: "^6.0.3",
|
|
192
202
|
vite: "8.2.2",
|
|
193
|
-
vue: "^3.5.
|
|
203
|
+
vue: "^3.5.42",
|
|
194
204
|
zod: "^4.4.3"
|
|
195
205
|
};
|
|
196
206
|
const TEMPLATE_NAMED_CATALOG = {
|
|
197
207
|
"tdesign-miniprogram-fixed": { "tdesign-miniprogram": "1.16.0" },
|
|
198
|
-
"weapp-tailwindcss-fixed": { "weapp-tailwindcss": "5.
|
|
208
|
+
"weapp-tailwindcss-fixed": { "weapp-tailwindcss": "5.4.1" },
|
|
199
209
|
latest: {
|
|
200
210
|
"miniprogram-api-typings": "^5.2.3",
|
|
201
211
|
typescript: "^6.0.3"
|
|
@@ -516,17 +526,16 @@ async function rewriteProjectConfigAppId(targetDir) {
|
|
|
516
526
|
function createEmptyPackageJson() {
|
|
517
527
|
return {
|
|
518
528
|
name: "weapp-vite-app",
|
|
519
|
-
homepage: "https://vite.
|
|
529
|
+
homepage: "https://vite.weapp.dev/",
|
|
520
530
|
type: "module",
|
|
521
531
|
scripts: {},
|
|
522
532
|
devDependencies: {}
|
|
523
533
|
};
|
|
524
534
|
}
|
|
525
535
|
async function upsertTailwindcssVersion(pkgJson) {
|
|
526
|
-
if (!pkgJson.devDependencies) return;
|
|
536
|
+
if (!pkgJson.devDependencies?.["weapp-tailwindcss"]) return;
|
|
527
537
|
const resolved = await latestVersion("weapp-tailwindcss");
|
|
528
538
|
if (resolved) pkgJson.devDependencies["weapp-tailwindcss"] = resolved;
|
|
529
|
-
else if (!pkgJson.devDependencies["weapp-tailwindcss"]) pkgJson.devDependencies["weapp-tailwindcss"] = "^5.0.0";
|
|
530
539
|
}
|
|
531
540
|
function upsertExistingDependencyVersion(pkgJson, packageName, resolvedVersion) {
|
|
532
541
|
if (pkgJson.dependencies?.[packageName]) pkgJson.dependencies[packageName] = resolvedVersion;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-weapp-vite",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.8.
|
|
4
|
+
"version": "2.8.6",
|
|
5
5
|
"description": "create-weapp-vite",
|
|
6
6
|
"author": "ice breaker <1324318532@qq.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -46,10 +46,10 @@
|
|
|
46
46
|
"node": "^20.19.0 || >=22.12.0"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@inquirer/prompts": "^8.
|
|
49
|
+
"@inquirer/prompts": "^8.7.0",
|
|
50
50
|
"pathe": "^2.0.3",
|
|
51
51
|
"pkg-types": "^2.3.1",
|
|
52
|
-
"@weapp-core/init": "6.0.
|
|
52
|
+
"@weapp-core/init": "6.0.16",
|
|
53
53
|
"@weapp-core/logger": "3.1.1",
|
|
54
54
|
"@weapp-core/shared": "3.2.0"
|
|
55
55
|
},
|
|
@@ -5,11 +5,11 @@ Page({
|
|
|
5
5
|
hello: {
|
|
6
6
|
title: 'Hello weapp-vite',
|
|
7
7
|
description: '这是最基础的 weapp-vite 模板,包含快速开发所需的构建与热更新能力。',
|
|
8
|
-
docs: 'https://vite.
|
|
8
|
+
docs: 'https://vite.weapp.dev',
|
|
9
9
|
links: [
|
|
10
10
|
{
|
|
11
11
|
text: '复制文档链接',
|
|
12
|
-
url: 'https://vite.
|
|
12
|
+
url: 'https://vite.weapp.dev',
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
15
|
text: 'GitHub 仓库',
|
package/templates/lib/README.md
CHANGED
|
@@ -5,11 +5,11 @@ Page({
|
|
|
5
5
|
hello: {
|
|
6
6
|
title: 'Hello weapp-vite lib',
|
|
7
7
|
description: '此模板包含原生组件与 Vue SFC 组件,可在小程序内调试并用 lib 模式打包。',
|
|
8
|
-
docs: 'https://vite.
|
|
8
|
+
docs: 'https://vite.weapp.dev',
|
|
9
9
|
links: [
|
|
10
10
|
{
|
|
11
11
|
text: '复制文档链接',
|
|
12
|
-
url: 'https://vite.
|
|
12
|
+
url: 'https://vite.weapp.dev',
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
15
|
text: 'GitHub 仓库',
|
|
@@ -43,4 +43,4 @@ pnpm build:web
|
|
|
43
43
|
|
|
44
44
|
便携源码使用原生 `Page()` / `Component()`,公共模板采用 WXML 语法,并通过 `wx` API 编写平台无关逻辑。构建时 `injectWeapi.replaceWx` 会替换运行时 API,模板、样式、事件和脚本模块后缀会按目标平台转换。平台专属能力应隔离在独立模块或条件入口中,避免让公共页面直接依赖某个宿主的 TypeScript 类型。
|
|
45
45
|
|
|
46
|
-
Web Runtime 适合浏览器联调和兼容验证,不能替代小程序开发者工具或真机验收。构建通过也不等于官方 IDE 编译或 Runtime 交互通过:微信和 Web 可以做自动化交互验收,支付宝使用官方 `minidev build` 做 IDE 编译检查,百度 Runtime 依赖可用的 WebSocket 端点,抖音、京东和小红书仍需在各自官方工具中人工复验。详细说明见 [多平台构建指南](https://vite.
|
|
46
|
+
Web Runtime 适合浏览器联调和兼容验证,不能替代小程序开发者工具或真机验收。构建通过也不等于官方 IDE 编译或 Runtime 交互通过:微信和 Web 可以做自动化交互验收,支付宝使用官方 `minidev build` 做 IDE 编译检查,百度 Runtime 依赖可用的 WebSocket 端点,抖音、京东和小红书仍需在各自官方工具中人工复验。详细说明见 [多平台构建指南](https://vite.weapp.dev/guide/multi-platform)。
|
|
@@ -40,4 +40,4 @@ pnpm build:web
|
|
|
40
40
|
|
|
41
41
|
各平台项目配置位于 `config/<platform>`。创建项目后请替换目标平台的 AppID,再导入对应的 `dist/<platform>` 目录。
|
|
42
42
|
|
|
43
|
-
Web Runtime 适合浏览器联调和兼容验证,不能替代小程序开发者工具或真机验收。微信和 Web 可以做自动化交互验收,支付宝使用官方 `minidev build` 做 IDE 编译检查,百度 Runtime 依赖可用的 WebSocket 端点,抖音、京东和小红书仍需在各自官方工具中人工复验。详细说明见 [多平台构建指南](https://vite.
|
|
43
|
+
Web Runtime 适合浏览器联调和兼容验证,不能替代小程序开发者工具或真机验收。微信和 Web 可以做自动化交互验收,支付宝使用官方 `minidev build` 做 IDE 编译检查,百度 Runtime 依赖可用的 WebSocket 端点,抖音、京东和小红书仍需在各自官方工具中人工复验。详细说明见 [多平台构建指南](https://vite.weapp.dev/guide/multi-platform)。
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@weapp-vite/react": "workspace:*",
|
|
22
|
-
"react": "
|
|
23
|
-
"react-reconciler": "
|
|
22
|
+
"react": "catalog:",
|
|
23
|
+
"react-reconciler": "catalog:",
|
|
24
24
|
"wevu": "workspace:*"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"@icebreakers/stylelint-config": "catalog:",
|
|
29
29
|
"@swc/core": "^1.16.1",
|
|
30
30
|
"@types/node": "catalog:",
|
|
31
|
-
"@types/react": "
|
|
32
|
-
"@types/react-reconciler": "
|
|
31
|
+
"@types/react": "catalog:",
|
|
32
|
+
"@types/react-reconciler": "catalog:",
|
|
33
33
|
"eslint": "catalog:",
|
|
34
34
|
"miniprogram-api-typings": "catalog:",
|
|
35
35
|
"stylelint": "catalog:",
|
|
@@ -7,11 +7,11 @@ Page({
|
|
|
7
7
|
hello: {
|
|
8
8
|
title: 'Hello weapp-vite',
|
|
9
9
|
description: '这是一个集成 Tailwind CSS 的小程序模板,开箱即可体验原子化样式与完整的 HMR 流程。',
|
|
10
|
-
docs: 'https://vite.
|
|
10
|
+
docs: 'https://vite.weapp.dev',
|
|
11
11
|
links: [
|
|
12
12
|
{
|
|
13
13
|
text: '复制文档链接',
|
|
14
|
-
url: 'https://vite.
|
|
14
|
+
url: 'https://vite.weapp.dev',
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
text: 'Tailwind Demo',
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<view class="min-h-screen {{ mode === 'light'?'bg-gray-100 text-slate-800':'bg-gray-900 text-slate-200' }} transition-colors duration-500">
|
|
2
2
|
<view class="flex flex-col items-center pt-6 space-y-4">
|
|
3
3
|
<view class="flex space-x-8">
|
|
4
|
-
<view class="w-24 h-24 bg-[url(https://vite.
|
|
5
|
-
<view class="w-32 h-24 bg-[url(https://vite.
|
|
4
|
+
<view class="w-24 h-24 bg-[url(https://vite.weapp.dev/logo.png)] bg-[length:100%_100%] bg-no-repeat"></view>
|
|
5
|
+
<view class="w-32 h-24 bg-[url(https://vite.weapp.dev/tw-logo.png)] bg-[length:100%_100%] bg-no-repeat"></view>
|
|
6
6
|
</view>
|
|
7
7
|
<view class="bg-linear-to-r from-green-400 to-sky-400 bg-clip-text text-xl font-extrabold text-transparent underline">
|
|
8
8
|
weapp-vite & weapp-tailwindcss
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
<text>切换模式</text>
|
|
15
15
|
<view class="iconify {{ mode === 'light' ? 'i-mdi-moon-waxing-crescent':'i-mdi-weather-sunny text-white' }} text-4xl" bind:tap="switchMode"></view>
|
|
16
16
|
</view>
|
|
17
|
-
<view class="underline" mark:url="https://vite.
|
|
18
|
-
https://vite.
|
|
17
|
+
<view class="underline" mark:url="https://vite.weapp.dev" bind:tap="copy">
|
|
18
|
+
https://vite.weapp.dev
|
|
19
19
|
</view>
|
|
20
20
|
<view class="underline" mark:url="https://tw.icebreaker.top/" bind:tap="copy">
|
|
21
21
|
https://tw.icebreaker.top/
|
|
@@ -3,11 +3,11 @@ Page({
|
|
|
3
3
|
hello: {
|
|
4
4
|
title: 'Hello weapp-vite',
|
|
5
5
|
description: '这里是一个额外的页面示例,你可以继续拆分业务模块并复用组件。',
|
|
6
|
-
docs: 'https://vite.
|
|
6
|
+
docs: 'https://vite.weapp.dev',
|
|
7
7
|
links: [
|
|
8
8
|
{
|
|
9
9
|
text: '复制文档链接',
|
|
10
|
-
url: 'https://vite.
|
|
10
|
+
url: 'https://vite.weapp.dev',
|
|
11
11
|
},
|
|
12
12
|
],
|
|
13
13
|
},
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import path from 'node:path'
|
|
2
|
-
import { WeappTailwindcss } from 'weapp-tailwindcss/vite'
|
|
3
1
|
import { defineConfig } from 'weapp-vite'
|
|
4
2
|
|
|
5
3
|
export default defineConfig({
|
|
6
4
|
weapp: {
|
|
7
5
|
srcRoot: 'src',
|
|
6
|
+
tailwindcss: {
|
|
7
|
+
rem2rpx: true,
|
|
8
|
+
cssEntries: ['src/app.css'],
|
|
9
|
+
},
|
|
8
10
|
// pnpm g 生成的格式
|
|
9
|
-
// https://vite.
|
|
11
|
+
// https://vite.weapp.dev/guide/generate.html
|
|
10
12
|
generate: {
|
|
11
13
|
extensions: {
|
|
12
14
|
js: 'ts',
|
|
@@ -30,10 +32,4 @@ export default defineConfig({
|
|
|
30
32
|
},
|
|
31
33
|
},
|
|
32
34
|
},
|
|
33
|
-
plugins: [
|
|
34
|
-
WeappTailwindcss({
|
|
35
|
-
rem2rpx: true,
|
|
36
|
-
cssEntries: [path.resolve(import.meta.dirname, 'src/app.css')],
|
|
37
|
-
}),
|
|
38
|
-
],
|
|
39
35
|
})
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<view class="flex space-x-8">
|
|
2
|
-
<view class="w-24 h-24 bg-[url(https://vite.
|
|
3
|
-
<view class="w-32 h-24 bg-[url(https://vite.
|
|
2
|
+
<view class="w-24 h-24 bg-[url(https://vite.weapp.dev/logo.png)] bg-[length:100%_100%] bg-no-repeat"></view>
|
|
3
|
+
<view class="w-32 h-24 bg-[url(https://vite.weapp.dev/tw-logo.png)] bg-[length:100%_100%] bg-no-repeat"></view>
|
|
4
4
|
</view>
|
|
5
5
|
<view class="bg-linear-to-r from-green-400 to-sky-400 bg-clip-text text-xl font-extrabold text-transparent underline">
|
|
6
6
|
weapp-vite & weapp-tailwindcss
|
|
@@ -42,11 +42,11 @@ Page({
|
|
|
42
42
|
hello: {
|
|
43
43
|
title: 'Hello weapp-vite + TDesign',
|
|
44
44
|
description: '集成 TDesign Miniprogram 与 Tailwind CSS,帮助你快速搭建企业级交互界面。',
|
|
45
|
-
docs: 'https://vite.
|
|
45
|
+
docs: 'https://vite.weapp.dev',
|
|
46
46
|
links: [
|
|
47
47
|
{
|
|
48
48
|
text: '复制文档链接',
|
|
49
|
-
url: 'https://vite.
|
|
49
|
+
url: 'https://vite.weapp.dev',
|
|
50
50
|
},
|
|
51
51
|
{
|
|
52
52
|
text: 'TDesign 小程序组件',
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
当前模式 {{mode}} 切换模式
|
|
11
11
|
<view class="iconify {{ mode === 'light' ? 'i-mdi-moon-waxing-crescent':'i-mdi-weather-sunny text-white' }} text-2xl"></view>
|
|
12
12
|
</view>
|
|
13
|
-
<view class="underline" mark:url="https://vite.
|
|
14
|
-
https://vite.
|
|
13
|
+
<view class="underline" mark:url="https://vite.weapp.dev" bind:tap="copy">
|
|
14
|
+
https://vite.weapp.dev
|
|
15
15
|
</view>
|
|
16
16
|
<view class="underline" mark:url="https://tw.icebreaker.top" bind:tap="copy">
|
|
17
17
|
https://tw.icebreaker.top
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import path from 'node:path'
|
|
2
|
-
import { WeappTailwindcss } from 'weapp-tailwindcss/vite'
|
|
3
1
|
import { defineConfig } from 'weapp-vite'
|
|
4
2
|
import { TDesignResolver } from 'weapp-vite/auto-import-components/resolvers'
|
|
5
3
|
|
|
6
4
|
export default defineConfig({
|
|
7
5
|
weapp: {
|
|
8
6
|
srcRoot: 'src',
|
|
7
|
+
tailwindcss: {
|
|
8
|
+
rem2rpx: true,
|
|
9
|
+
cssEntries: ['src/app.css'],
|
|
10
|
+
},
|
|
9
11
|
typescript: {
|
|
10
12
|
app: {
|
|
11
13
|
compilerOptions: {
|
|
@@ -19,7 +21,7 @@ export default defineConfig({
|
|
|
19
21
|
resolvers: [TDesignResolver()],
|
|
20
22
|
},
|
|
21
23
|
// pnpm g 生成的格式
|
|
22
|
-
// https://vite.
|
|
24
|
+
// https://vite.weapp.dev/guide/generate.html
|
|
23
25
|
generate: {
|
|
24
26
|
extensions: {
|
|
25
27
|
js: 'ts',
|
|
@@ -43,10 +45,4 @@ export default defineConfig({
|
|
|
43
45
|
},
|
|
44
46
|
},
|
|
45
47
|
},
|
|
46
|
-
plugins: [
|
|
47
|
-
WeappTailwindcss({
|
|
48
|
-
rem2rpx: true,
|
|
49
|
-
cssEntries: [path.resolve(import.meta.dirname, 'src/app.css')],
|
|
50
|
-
}),
|
|
51
|
-
],
|
|
52
48
|
})
|
package/templates/vant/README.md
CHANGED
|
@@ -8,11 +8,11 @@ Page({
|
|
|
8
8
|
hello: {
|
|
9
9
|
title: 'Hello weapp-vite + Vant',
|
|
10
10
|
description: '基于 weapp-vite 与 Tailwind CSS,并预先集成了 Vant Weapp 组件库,助你快速搭建业务界面。',
|
|
11
|
-
docs: 'https://vite.
|
|
11
|
+
docs: 'https://vite.weapp.dev',
|
|
12
12
|
links: [
|
|
13
13
|
{
|
|
14
14
|
text: '复制文档链接',
|
|
15
|
-
url: 'https://vite.
|
|
15
|
+
url: 'https://vite.weapp.dev',
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
18
|
text: 'Vant 组件手册',
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<view class="min-h-screen {{ mode === 'light'?'bg-gray-100 text-slate-800':'bg-gray-900 text-slate-200' }} transition-colors duration-500">
|
|
2
2
|
<view class="flex flex-col items-center pt-20 space-y-10">
|
|
3
3
|
<view class="flex space-x-8">
|
|
4
|
-
<view class="w-24 h-24 bg-[url(https://vite.
|
|
5
|
-
<view class="w-32 h-24 bg-[url(https://vite.
|
|
4
|
+
<view class="w-24 h-24 bg-[url(https://vite.weapp.dev/logo.png)] bg-[length:100%_100%] bg-no-repeat"></view>
|
|
5
|
+
<view class="w-32 h-24 bg-[url(https://vite.weapp.dev/tw-logo.png)] bg-[length:100%_100%] bg-no-repeat"></view>
|
|
6
6
|
</view>
|
|
7
7
|
<view class="bg-linear-to-r from-green-400 to-sky-400 bg-clip-text text-xl font-extrabold text-transparent underline">
|
|
8
8
|
weapp-vite & weapp-tailwindcss
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
links="{{hello.links}}"
|
|
15
15
|
/>
|
|
16
16
|
<view class="iconify {{ mode === 'light' ? 'i-mdi-moon-waxing-crescent':'i-mdi-weather-sunny text-white' }} text-8xl" bind:tap="switchMode"></view>
|
|
17
|
-
<view class="underline" mark:url="https://vite.
|
|
18
|
-
https://vite.
|
|
17
|
+
<view class="underline" mark:url="https://vite.weapp.dev" bind:tap="copy">
|
|
18
|
+
https://vite.weapp.dev
|
|
19
19
|
</view>
|
|
20
20
|
<view class="underline" mark:url="https://tw.icebreaker.top" bind:tap="copy">
|
|
21
21
|
https://tw.icebreaker.top
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import path from 'node:path'
|
|
2
|
-
import { WeappTailwindcss } from 'weapp-tailwindcss/vite'
|
|
3
1
|
import { defineConfig } from 'weapp-vite'
|
|
4
2
|
import { VantResolver } from 'weapp-vite/auto-import-components/resolvers'
|
|
5
3
|
|
|
6
4
|
export default defineConfig({
|
|
7
5
|
weapp: {
|
|
8
6
|
srcRoot: 'src',
|
|
7
|
+
tailwindcss: {
|
|
8
|
+
rem2rpx: true,
|
|
9
|
+
cssEntries: ['src/app.css'],
|
|
10
|
+
},
|
|
9
11
|
typescript: {
|
|
10
12
|
app: {
|
|
11
13
|
compilerOptions: {
|
|
@@ -19,7 +21,7 @@ export default defineConfig({
|
|
|
19
21
|
resolvers: [VantResolver()],
|
|
20
22
|
},
|
|
21
23
|
// pnpm g 生成的格式
|
|
22
|
-
// https://vite.
|
|
24
|
+
// https://vite.weapp.dev/guide/generate.html
|
|
23
25
|
generate: {
|
|
24
26
|
extensions: {
|
|
25
27
|
js: 'ts',
|
|
@@ -43,10 +45,4 @@ export default defineConfig({
|
|
|
43
45
|
},
|
|
44
46
|
},
|
|
45
47
|
},
|
|
46
|
-
plugins: [
|
|
47
|
-
WeappTailwindcss({
|
|
48
|
-
rem2rpx: true,
|
|
49
|
-
cssEntries: [path.resolve(import.meta.dirname, 'src/app.css')],
|
|
50
|
-
}),
|
|
51
|
-
],
|
|
52
48
|
})
|
package/templates/wevu/README.md
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import path from 'node:path'
|
|
2
|
-
import { WeappTailwindcss } from 'weapp-tailwindcss/vite'
|
|
3
2
|
import { defineConfig } from 'weapp-vite'
|
|
4
3
|
import { TDesignResolver } from 'weapp-vite/auto-import-components/resolvers'
|
|
5
4
|
|
|
@@ -11,6 +10,10 @@ export default defineConfig({
|
|
|
11
10
|
},
|
|
12
11
|
weapp: {
|
|
13
12
|
srcRoot: 'src',
|
|
13
|
+
tailwindcss: {
|
|
14
|
+
rem2rpx: true,
|
|
15
|
+
cssEntries: ['src/app.css'],
|
|
16
|
+
},
|
|
14
17
|
typescript: {
|
|
15
18
|
app: {
|
|
16
19
|
compilerOptions: {
|
|
@@ -59,7 +62,7 @@ export default defineConfig({
|
|
|
59
62
|
},
|
|
60
63
|
},
|
|
61
64
|
// pnpm g 生成的格式
|
|
62
|
-
// https://vite.
|
|
65
|
+
// https://vite.weapp.dev/guide/generate.html
|
|
63
66
|
generate: {
|
|
64
67
|
extensions: {
|
|
65
68
|
js: 'ts',
|
|
@@ -83,10 +86,4 @@ export default defineConfig({
|
|
|
83
86
|
},
|
|
84
87
|
},
|
|
85
88
|
},
|
|
86
|
-
plugins: [
|
|
87
|
-
WeappTailwindcss({
|
|
88
|
-
rem2rpx: true,
|
|
89
|
-
cssEntries: [path.resolve(import.meta.dirname, 'src/app.css')],
|
|
90
|
-
}),
|
|
91
|
-
],
|
|
92
89
|
})
|