jest-script-setup-transform.js 404 B

12345678910111213
  1. // https://github.com/antfu/unplugin-vue2-script-setup/issues/8
  2. const { raw } = require("unplugin-vue2-script-setup")
  3. const transform = raw().transform
  4. module.exports = {
  5. process(source, filename, ...args) {
  6. const transformed = transform(source, filename)
  7. const code = transformed ? transformed.code : source
  8. return require("vue-jest").process.call(this, code, filename, ...args)
  9. },
  10. }