Skip to content

Commit 8db482d

Browse files
committed
chore: bump version
1 parent 39e8e57 commit 8db482d

3 files changed

Lines changed: 60 additions & 4 deletions

File tree

.changeset/pre.json

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"mode": "pre",
3+
"tag": "alpha",
4+
"initialVersions": {
5+
"rsmax-app-ts": "1.0.0",
6+
"taro-webpack-tailwindcss-v4": "1.0.0",
7+
"uni-app-x-hbuilderx-tailwindcss3": "0.0.0",
8+
"uni-app-x-hbuilderx-tailwindcss4": "0.0.0",
9+
"vite-native": "1.0.9",
10+
"vite-native-skyline": "1.0.1",
11+
"vite-native-ts": "1.0.12",
12+
"vite-native-ts-skyline": "1.0.1",
13+
"vue-app": "0.0.0",
14+
"weapp-wechat-zhihu": "1.0.0",
15+
"@native-app/postcss7-compat": "1.0.1",
16+
"benchmark": "0.0.1",
17+
"@weapp-tailwindcss/babel": "0.0.2",
18+
"@weapp-tailwindcss/debug-uni-app-x": "0.0.0",
19+
"@weapp-tailwindcss/experimental": "0.0.1",
20+
"@weapp-tailwindcss/init": "1.0.4",
21+
"@weapp-tailwindcss/logger": "1.0.2",
22+
"@weapp-tailwindcss/mangle": "1.0.5",
23+
"@weapp-tailwindcss/merge": "1.2.3",
24+
"@weapp-tailwindcss/postcss": "1.0.21",
25+
"@weapp-tailwindcss/shared": "1.0.3",
26+
"tailwindcss-config": "1.1.1",
27+
"tailwindcss-core-plugins-extractor": "0.2.0",
28+
"tailwindcss-injector": "1.0.4",
29+
"@weapp-tailwindcss/test-helper": "0.0.0",
30+
"theme-transition": "1.0.2",
31+
"weapp-tailwindcss": "4.2.5",
32+
"@weapp-tailwindcss/typography": "0.2.4",
33+
"@weapp-tailwindcss/website": "1.0.2"
34+
},
35+
"changesets": []
36+
}

packages/weapp-tailwindcss/src/context/index.ts

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import type { TailwindcssPatcherOptions } from 'tailwindcss-patch'
12
import type {
23
ICustomAttributes,
34
ICustomAttributesEntities,
@@ -57,6 +58,7 @@ export function getCompilerContext(opts?: UserDefinedOptions): InternalUserDefin
5758
tailwindcss,
5859
tailwindcssPatcherOptions,
5960
uniAppX,
61+
cssEntries,
6062
} = ctx
6163

6264
const customAttributesEntities: ICustomAttributesEntities = isMap(customAttributes)
@@ -114,7 +116,25 @@ export function getCompilerContext(opts?: UserDefinedOptions): InternalUserDefin
114116
cacheDir: appType === 'mpx' ? 'node_modules/tailwindcss-patch/.cache' : undefined,
115117
supportCustomLengthUnitsPatch: supportCustomLengthUnitsPatch ?? true,
116118
tailwindcss,
117-
tailwindcssPatcherOptions,
119+
tailwindcssPatcherOptions: defuOverrideArray<TailwindcssPatcherOptions, TailwindcssPatcherOptions[]>(
120+
tailwindcssPatcherOptions,
121+
{
122+
patch: {
123+
// cwd: tailwindcssBasedir,
124+
tailwindcss: {
125+
// @ts-ignore
126+
// cwd: tailwindcssBasedir,
127+
// v3: {
128+
// cwd: tailwindcssBasedir,
129+
// },
130+
v4: {
131+
base: tailwindcssBasedir,
132+
cssEntries,
133+
},
134+
},
135+
},
136+
},
137+
),
118138
},
119139
)
120140
ctx.setMangleRuntimeSet = setMangleRuntimeSet

packages/weapp-tailwindcss/src/js/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import type { CreateJsHandlerOptions, IJsHandlerOptions } from '../types'
1+
import type { CreateJsHandlerOptions, IJsHandlerOptions, JsHandler } from '../types'
22
import { defuOverrideArray } from '../utils'
33
import { jsHandler } from './babel'
44

55
export {
66
jsHandler,
77
}
88

9-
export function createJsHandler(options: CreateJsHandlerOptions) {
9+
export function createJsHandler(options: CreateJsHandlerOptions): JsHandler {
1010
const {
1111
mangleContext,
1212
arbitraryValues,
@@ -19,7 +19,7 @@ export function createJsHandler(options: CreateJsHandlerOptions) {
1919
uniAppX,
2020
} = options
2121

22-
function handler(rawSource: string, classNameSet: Set<string>, options?: CreateJsHandlerOptions) {
22+
function handler(rawSource: string, classNameSet?: Set<string>, options?: CreateJsHandlerOptions) {
2323
const opts = defuOverrideArray<IJsHandlerOptions, IJsHandlerOptions[]>(options as IJsHandlerOptions, {
2424
classNameSet,
2525
escapeMap,

0 commit comments

Comments
 (0)