I am running a Vue/Typescript/Vuetify project(Created with vue cli 3). For unit testing I am using Jest. I upgraded to a newer version of Vuetify(1.3.1). Since the upgrade I get an error when running my Jest tests:
location_to_project\node_modules\vuetify\lib\index.js:1
({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,global,jest){import Vuetify from './components/Vuetify';
^^^^^^
SyntaxError: Unexpected token import
1 | import Vue from 'vue'
2 | // @ts-ignore
> 3 | import Vuetify from 'vuetify/lib'
| ^
4 | import 'vuetify/src/stylus/app.styl'
5 |
6 | Vue.use(Vuetify, {
at ScriptTransformer._transformAndBuildScript (node_modules/jest-runtime/build/script_transformer.js:4 7)
03:17)
at Object.<anonymous> (src/plugins/vuetify.ts:3:1)
Versions and Environment
Vuetify: 1.3.0
Vue: 2.5.17
Previously worked in:
Vuetify: 1.2.10
Vue: 2.5.17
babel.config.js
module.exports = {
presets: [
[
"@vue/app",
{
useBuiltIns: "entry"
}
],
],
};
tsConfig Compiler:
"target": "esnext"
"module": "esnext"
1.1.13. I'm not sure why this had ever worked before.