paljs/create-nexus-type

There are problems when compiling to JS

Closed this issue · 2 comments

RUN cnt -s -mq -m -q -f -o --js

generate ok. But generated code Error.

export const User = objectType({
^^^^^^

SyntaxError: Unexpected token 'export'
...

Possible reasons :

    fileContent += `export const ${model.name} = objectType({
...

fix

fileContent += `${args['--js'] ? '' : 'export '}const ${
      model.name
    }

Sorry for the delay I just pushed a new release with the fix 1.2.6