Make tests and project actually work
This commit is contained in:
parent
0c988b6046
commit
94ab70ba1c
|
|
@ -0,0 +1,27 @@
|
||||||
|
module.exports = {
|
||||||
|
presets: [
|
||||||
|
[
|
||||||
|
"@babel/preset-env",
|
||||||
|
{
|
||||||
|
targets: {
|
||||||
|
node: "18",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"@babel/preset-react",
|
||||||
|
"@babel/preset-typescript",
|
||||||
|
],
|
||||||
|
plugins: [
|
||||||
|
"@babel/plugin-proposal-export-namespace-from",
|
||||||
|
"@babel/plugin-proposal-optional-chaining",
|
||||||
|
// Strip console.debug calls unless REMIX_DEBUG=true
|
||||||
|
...(process.env.REMIX_DEBUG === "true"
|
||||||
|
? []
|
||||||
|
: [
|
||||||
|
[
|
||||||
|
"transform-remove-console",
|
||||||
|
{ exclude: ["error", "warn", "log", "info"] },
|
||||||
|
],
|
||||||
|
]),
|
||||||
|
],
|
||||||
|
}
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
module.exports = {
|
|
||||||
presets: [
|
|
||||||
[
|
|
||||||
"@babel/preset-env",
|
|
||||||
{
|
|
||||||
targets: {
|
|
||||||
node: "18",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
"@babel/preset-react",
|
|
||||||
"@babel/preset-typescript",
|
|
||||||
],
|
|
||||||
plugins: [
|
|
||||||
"@babel/plugin-proposal-export-namespace-from",
|
|
||||||
"@babel/plugin-proposal-optional-chaining",
|
|
||||||
// Strip console.debug calls unless REMIX_DEBUG=true
|
|
||||||
...(process.env.REMIX_DEBUG === "true"
|
|
||||||
? []
|
|
||||||
: [
|
|
||||||
[
|
|
||||||
"transform-remove-console",
|
|
||||||
{ exclude: ["error", "warn", "log", "info"] },
|
|
||||||
],
|
|
||||||
]),
|
|
||||||
],
|
|
||||||
};
|
|
||||||
|
|
@ -17,6 +17,7 @@ module.exports = {
|
||||||
transform: {
|
transform: {
|
||||||
"\\.[jt]sx?$": require.resolve("./transform"),
|
"\\.[jt]sx?$": require.resolve("./transform"),
|
||||||
},
|
},
|
||||||
|
transformIgnorePatterns: [],
|
||||||
watchPathIgnorePatterns: [...ignorePatterns, "\\/node_modules\\/"],
|
watchPathIgnorePatterns: [...ignorePatterns, "\\/node_modules\\/"],
|
||||||
watchPlugins: [
|
watchPlugins: [
|
||||||
require.resolve("jest-watch-typeahead/filename"),
|
require.resolve("jest-watch-typeahead/filename"),
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
"name": "site",
|
"name": "site",
|
||||||
"private": true,
|
"private": true,
|
||||||
"sideEffects": false,
|
"sideEffects": false,
|
||||||
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "remix vite:build",
|
"build": "remix vite:build",
|
||||||
"dev": "remix vite:dev",
|
"dev": "remix vite:dev",
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
let { default: babelJest } = require("babel-jest");
|
import babelJest from "babel-jest"
|
||||||
|
|
||||||
let baseConfig = require("./babel.config.js");
|
import baseConfig from "./babel.config.cjs"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Replace `import.meta` with `undefined`
|
* Replace `import.meta` with `undefined`
|
||||||
|
|
@ -17,7 +17,7 @@ let metaPlugin = ({ types: t }) => ({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
module.exports = babelJest.createTransformer({
|
export default babelJest.createTransformer({
|
||||||
babelrc: false,
|
babelrc: false,
|
||||||
...baseConfig,
|
...baseConfig,
|
||||||
plugins: [...baseConfig.plugins, metaPlugin],
|
plugins: [...baseConfig.plugins, metaPlugin],
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue