-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
关于 import ,但是node环境 commonjs 如何方便测试你的代码呢? #2
Comments
前言里有提到,控制台用npx babel-node xxx.js |
谢谢 你的回复 忘了还有这个东西了 |
(function (exports, require, module, __filename, __dirname) { import { Observable } from 'rxjs/Observable'; 用 npx 不行,也无法处理 import |
你可以检查下有没有安装babel相关的模块,可以参考作者提供的package.json进行安装 |
@ElvisWangTech ,谢谢回复,试了一下,的确是babel没有配置好,自己添加个 .babelrc 文件然后写好配置就行了 |
学到了~ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
如题?
购买你的书 没有看到怎么运行demo
代码又都是cmd,不会每一个代码 都改成commonjs的方法吧 ,所以麻烦说明一下 你是怎么行运,用webpack 搭一个环境,还是我没有看到书那里有说明
谢谢
The text was updated successfully, but these errors were encountered: