Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mustache 4.2.0 is not correctly imported #730

Closed
alaingiller opened this issue Jul 16, 2021 · 1 comment
Closed

Mustache 4.2.0 is not correctly imported #730

alaingiller opened this issue Jul 16, 2021 · 1 comment

Comments

@alaingiller
Copy link

Hi,

With "mustache": "4.2.0" and "@types/mustache": "^4.0.1", the following code do not works:

index.ts

#!/usr/bin/env node
import { render  } from 'mustache';
console.log('must be defined', render);

It works with either @zeit/ncc or mustache 4.1.0. Changelog: janl/mustache.js#773

@guybedford
Copy link
Contributor

@alaingiller you need to do:

import mustache from 'mustache';
const { render } = mustache;

here. You can see the same thing if you try running this in Node.js as an .mjs file.

@styfle styfle closed this as completed Aug 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants