Closed nyenye closed 6 years ago
This is the code:
class Ghost { constructor(name) { this.name = name } scare() { console.log('buuuuu') } } module.exports = Ghost
This is the error: SyntaxError: Unexpected token: name (Ghost) while parsing file
SyntaxError: Unexpected token: name (Ghost) while parsing file
I've also tried other syntaxes like: const Ghost = class {} or const Ghost = class Ghost {} all of them with no luck.
const Ghost = class {}
const Ghost = class Ghost {}
Is it not possible to use class syntax with budo?
Alerady solved it. Missing some bable plugins.
This is the code:
This is the error:
SyntaxError: Unexpected token: name (Ghost) while parsing file
I've also tried other syntaxes like:
const Ghost = class {}
orconst Ghost = class Ghost {}
all of them with no luck.Is it not possible to use class syntax with budo?