fix: ignore tests in build output (#579)

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

No files matched your search

@@ -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"]
}
}
}
@@ -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,
}
@@ -3,6 +3,7 @@ node_modules
.DS_store .DS_store
.env* .env*
/*.js /*.js
!.babelrc.js
!index.js !index.js
yarn.lock yarn.lock