Open sergiocastrovale opened 6 years ago
I'm not sure if this is a Nuxt-wide issue but I'm not being able to use ES6 features within the server module (located under api/).
For example:
import { Router } from 'express' import userRoutes from './user' const router = Router() router.use(userRoutes) export default router
Renders the infamous SyntaxError: Unexpected token import error. Any idea on how to tackle this?
SyntaxError: Unexpected token import
this is because node does not support the import statement yet.
I'm not sure if this is a Nuxt-wide issue but I'm not being able to use ES6 features within the server module (located under api/).
For example:
Renders the infamous
SyntaxError: Unexpected token import
error. Any idea on how to tackle this?