Closed hugueschabot closed 5 years ago
This seems to be broken again (or maybe the fix didn't cover all cases). I know this project isn't active anymore but posting this for anyone else that's wondering what's up. The behavior I'm seeing is essentially the exact same as the one described here. The only workaround seems to be to just keep using require
when importing nanohtml rather than using the ESM import syntax.
The code produced by Typescript transpiler with
esModuleInterop
is not processed correctly by nanohtml browserify transform.esModuleInterop
is required when migrating from Javascript to Typescript.How to reproduce
Create a Typescript file,
test.ts
Create the
tsconfig.json
file.Browserify the
test.ts
withtsify
andnanohtml
.In the result, the
nanohtml
require
is removed, as expected but the string template is not processed.The expected result would look like this.