From 396372d776d41a30045a612b53b9c64fc54c0f84 Mon Sep 17 00:00:00 2001 From: Ryan Wu Date: Mon, 22 Aug 2022 00:17:30 +0800 Subject: [PATCH] Fix match rule for Vue setup script (#63) * fix match rule for Vue setup script * bump version to 1.5.4 --- package.json | 2 +- src/taro/webpack-plugin.ts | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index b842cfb..b9cc402 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@dcasia/mini-program-tailwind-webpack-plugin", - "version": "1.5.3", + "version": "1.5.4", "description": "让你的小程序用上原汁原味的 Tailwind/Windi CSS", "keywords": [ "mini-program", diff --git a/src/taro/webpack-plugin.ts b/src/taro/webpack-plugin.ts index 911e694..ebed3f6 100644 --- a/src/taro/webpack-plugin.ts +++ b/src/taro/webpack-plugin.ts @@ -8,7 +8,7 @@ import { regExpJS } from '../utilities' const frameworkModuleCharacteristics = { [ TaroFramework.React ]: [ '.jsx', '.tsx' ], [ TaroFramework.Vue2 ]: [ 'type=template' ], - [ TaroFramework.Vue3 ]: [ 'type=template', 'type=script&setup=true' ], + [ TaroFramework.Vue3 ]: [ 'type=template', 'setup=true' ], [ TaroFramework.Preact ]: [ '.jsx', '.tsx' ], } @@ -57,6 +57,9 @@ export default class TaroVNodeTailwindWebpackPlugin implements WebpackPluginInst for (const module of Array.from(modules)) { + // @ts-ignore + console.log(module?._source?._valueAsString) + for (const charc of this.moduleCharcs) { // @ts-ignore