You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"use strict";var__importDefault=(this&&this.__importDefault)||function(mod){return(mod&&mod.__esModule) ? mod : {"default": mod};};Object.defineProperty(exports,"__esModule",{value: true});constchoo_1=__importDefault(require("choo"));consthtml_1=__importDefault(require("choo/html"));constapp=newchoo_1.default();app.route('/',function(){returnhtml_1.default`<body>meow</body>`;});module.exports=app.mount('body');
Expected Behavior
When processing index.js the HTML template strings are replace by DOM element creation.
Current Behavior
Currently, the HTML templates string are not replace and we get Uncaught TypeError: html_1.default is not a function in the Javascript console when starting bankai.
Context
In order to use choo with Typescript, is is better to transpile the code first and then pass it to bankai as suggested in #285 .
And in order to be able to apply nanohtml transform, one need to transpile to
es2015
at least (otherwise the template strings are transformed).When I need to enable the Typescript
esModuleInterop
option, it breaks the nanohtml transform.How to reproduce
Create
index.ts
Create
tsconfig.json
Transpile with
tsc index.ts
to getindex.js
Expected Behavior
When processing
index.js
the HTML template strings are replace by DOM element creation.Current Behavior
Currently, the HTML templates string are not replace and we get
Uncaught TypeError: html_1.default is not a function
in the Javascript console when starting bankai.Possible Solution
Upgrade nanohtml to version 1.7.0
The text was updated successfully, but these errors were encountered: