uptownhr / nuxt-express-module

Add express routes to your nuxt app
MIT License
61 stars 4 forks source link

Not being able to use ES6 #5

Open sergiocastrovale opened 6 years ago

sergiocastrovale commented 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?

uptownhr commented 6 years ago

this is because node does not support the import statement yet.