-
Notifications
You must be signed in to change notification settings - Fork 157
Open
Description
Jest has experimental support for ECMAScript Modules (ESM). It is useful because more libraries are starting to ship only ESM (that is, they are no longer shipping CommonJS).
Currently, when transforming TypeScript, vue-jest forces the use of CommonJS:
vue-jest/packages/vue3-jest/lib/utils.js
Lines 115 to 117 in de5af78
// Force es5 to prevent const vue_1 = require('vue') from conflicting | |
target: typescript.ScriptTarget.ES5, | |
module: typescript.ModuleKind.CommonJS |
This means it is not possible to import ESM from a Vue SFC. It would be nice to have a way to override this so that it can be used in an otherwise ESM project.
(I realize that there's probably nobody around who'd want to work on this, but I figured I should at least document it for when I next try this again…)
Metadata
Metadata
Assignees
Labels
No labels