local-repl icon indicating copy to clipboard operation
local-repl copied to clipboard

Use with a code base in ES7

Open devth opened this issue 7 years ago • 2 comments

Very nice project :)

I am not able to get it to import my ES7 modules which use import syntax. Is there support or a workaround for it? Thanks.

devth avatar Oct 23 '18 14:10 devth

local-repl doesn't do any transformations (other than await syntax if enableAwait is enabled), so it will support the same syntax as the version of Node you're using. I'm unsure of any workaround for supporting import syntax in the Node repl.

sloria avatar Nov 09 '18 13:11 sloria

try with babel-node

in package.json

"scripts": {
  "repl": "babel-node node_modules/.bin/local-repl"
}

ttoohey avatar Feb 14 '19 01:02 ttoohey