feat: add build step to allow for nullish coalescing and optional chaining

This commit is contained in:
Andrew Bastin
2021-12-29 11:15:49 +05:30
parent 07171396ad
commit f8bbf6613f
4 changed files with 68 additions and 84 deletions

View File

@@ -11,6 +11,13 @@ module.exports = {
"^.+\\.js$": "babel-jest",
".*\\.(vue)$": "vue-jest",
},
globals: {
"vue-jest": {
templateCompiler: {
compiler: require("vue-template-babel-compiler"),
},
},
},
setupFilesAfterEnv: ["<rootDir>/jest.setup.js"],
snapshotSerializers: ["jest-serializer-vue"],
collectCoverage: true,

View File

@@ -251,6 +251,11 @@ export default {
// Build Configuration (https://go.nuxtjs.dev/config-build)
build: {
loaders: {
vue: {
compiler: require("vue-template-babel-compiler"),
},
},
// You can extend webpack config here
extend(config, { isDev, isClient }) {
// Sets webpack's mode to development if `isDev` is true.

View File

@@ -167,6 +167,7 @@
"ts-jest": "^27.1.2",
"typescript": "^4.5.4",
"vue-jest": "^3.0.7",
"vue-template-babel-compiler": "^1.0.8",
"worker-loader": "^3.0.8"
}
}