Attempt N to fix templating under yarn2nix

master
Sven Slootweg 5 years ago
parent 40602d4c4f
commit 789e91e242

@ -13,6 +13,14 @@ const bhttp = require("bhttp");
const createError = require("create-error");
const { ValidationError, validateValue, required, isString } = require("validatem");
require('@babel/register')({
extensions: [".jsx"],
presets: [
require.resolve("@babel/preset-react"),
[require.resolve("@babel/preset-env"), { targets: { node: "current" } }]
]
});
let UpstreamError = createError("UpstreamError");
function generateSince(hostname, token) {
@ -26,7 +34,7 @@ let app = express();
app.set("views", path.join(__dirname, "../views"));
app.set("view engine", "jsx");
app.engine("jsx", expressReactViews.createEngine());
app.engine("jsx", expressReactViews.createEngine({ transformViews: false }));
app.use(express.static(path.join(__dirname, "../public")));

@ -12,6 +12,7 @@
"@babel/plugin-transform-flow-strip-types": "^7.4.4",
"@babel/preset-env": "^7.5.5",
"@babel/preset-react": "^7.0.0",
"@babel/register": "^7.5.5",
"@joepie91/express-react-views": "^1.0.1",
"@modular-matrix/autodiscover-client-configuration": "^1.0.0",
"bhttp": "^1.2.4",

@ -678,7 +678,7 @@
"@babel/plugin-transform-react-jsx-self" "^7.0.0"
"@babel/plugin-transform-react-jsx-source" "^7.0.0"
"@babel/register@^7.0.0":
"@babel/register@^7.0.0", "@babel/register@^7.5.5":
version "7.5.5"
resolved "https://registry.yarnpkg.com/@babel/register/-/register-7.5.5.tgz#40fe0d474c8c8587b28d6ae18a03eddad3dac3c1"
integrity sha512-pdd5nNR+g2qDkXZlW1yRCWFlNrAn2PPdnZUB72zjX4l1Vv4fMRRLwyf+n/idFCLI1UgVGboUU8oVziwTBiyNKQ==

Loading…
Cancel
Save