element-plus/build/vue-jest-transformer.js
三咲智子 ca7bcfe9b3
feat: add defineOptions for script-setup (#5932)
* feat: add unplugin-vue-define-options

* feat: add jest support
2022-02-11 11:39:49 +08:00

12 lines
358 B
JavaScript

/* eslint-disable @typescript-eslint/no-var-requires */
const transfomer = require('vue-jest')
const { transform } = require('unplugin-vue-define-options')
module.exports = {
getCacheKey: transfomer.getCacheKey,
process(src, filename, config) {
src = transform(src, filename)?.code || src
return transfomer.process(src, filename, config)
},
}