Open slogsdon opened 7 years ago
I was working on including preact-async-route
to leverage dynamic import, and it seems to also be resolved by changing the target to es5
. Here's my current tsconfig.json
:
{
"compileOnSave": false,
"compilerOptions": {
"allowJs": false,
"jsx": "react",
"jsxFactory": "h",
"lib": [
"dom",
"es2015"
],
"module": "esnext",
"moduleResolution": "node",
"noFallthroughCasesInSwitch": true,
"noUnusedLocals": true,
"noImplicitReturns": true,
"noImplicitThis": true,
"sourceMap": true,
"strictNullChecks": true,
"target": "es5"
}
}
Ah jeeze... thanks for this, not sure how this got through. I'll get onto it ASAP.
No worries from my end. Just wanted to log it in case it really needs to be fixed and/or someone else runs into this.
Can confirm this still seems to be an issue and the fix, for me, was changing to:
target: "es5"
Thanks @slogsdon!
Running
preact build
with the defaulttsconfig.json
andpreact.config.js
files created by this plugin cause the following with a recently created Preact application (created withpreact-cli
):I got around the issue by adding the following to
tsconfig.json
: