fix: ignore tests in build output (#579)

This commit is contained in:
Sebastian Rindom
2021-10-24 10:23:09 +02:00
committed by GitHub
parent 6b83653bf6
commit 53178cbda3
3 changed files with 23 additions and 13 deletions

View File

@@ -1,13 +0,0 @@
{
"plugins": [
"@babel/plugin-proposal-class-properties",
"@babel/plugin-transform-instanceof",
"@babel/plugin-transform-classes"
],
"presets": ["@babel/preset-env"],
"env": {
"test": {
"plugins": ["@babel/plugin-transform-runtime"]
}
}
}

View File

@@ -0,0 +1,22 @@
const ignore = []
// Jest needs to compile this code, but generally we don't want this copied
// to output folders
if (process.env.NODE_ENV !== `test`) {
ignore.push(`**/__tests__`)
}
module.exports = {
plugins: [
"@babel/plugin-proposal-class-properties",
"@babel/plugin-transform-instanceof",
"@babel/plugin-transform-classes",
],
presets: ["@babel/preset-env"],
env: {
test: {
plugins: ["@babel/plugin-transform-runtime"],
},
},
ignore,
}

View File

@@ -3,6 +3,7 @@ node_modules
.DS_store
.env*
/*.js
!.babelrc.js
!index.js
yarn.lock