"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.uniUTSJsPlugin = void 0; const vue_1 = require("../../../vue"); function uniUTSJsPlugin(options = {}) { process.env.UNI_UTS_USING_ROLLUP = 'true'; return { name: 'uni:uts', enforce: 'pre', configResolved(config) { // 移除自带的 esbuild 处理 ts 文件 const index = config.plugins.findIndex((p) => p.name === 'vite:esbuild'); if (index > -1) { // @ts-expect-error config.plugins.splice(index, 1); } }, transform(code, id) { if (!(0, vue_1.isVueSfcFile)(id)) { return; } return code.replace(/]*)>/gi, (match, attributes) => { // 如果