Sublime Forum

How can I let ST3 use nodejs run import/export?

#1

The version of nodejs in my computer is 6.10.2(Windows)

And this is my Build-system setting in ST3:

{ "cmd": ["node", "--use-strict", "--harmony", "$file"], "file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)", "selector": "source.js", "shell":true, "encoding": "utf-8" }

When I use import or export and then ctrl+b,it doesn’t work:

E:\CodeMark\webpackTest\dev\index\js\a.js:15 export { obj }; ^^^^^^ SyntaxError: Unexpected token export

Do Ineed to make any changes? How to change the setting?

0 Likes