-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
Uncaught (in promise) ReferenceError: exports is not defined #277
Comments
@xyunsh 贴一下你 |
我觉得作为新项目不应该再用 |
@nikogu 就一句话
|
那 roadhog 需要给一个 add-module-exports 的配置开关。 |
roadhog 2 已经去掉 babel-plugin-add-module-export |
babel@7 好像不支持这个插件的。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
在utlis中增加一个index.js文件,导出utils中的所有函数:
export * from './utils';
引用dashboard/Analysis.js中引用
import { getTimeDistance } from '../../utils/index';
会报错
Uncaught (in promise) ReferenceError: exports is not defined at eval (webpack-internal:///1355:10) at Object.<anonymous> (0.async.js:2875) at __webpack_require__ (index.js:708) at fn (index.js:113) at eval (webpack-internal:///655:116) at Object.<anonymous> (0.async.js:6) at __webpack_require__ (index.js:708) at fn (index.js:113) at <anonymous> :8000/#/dashboard/analysis:1
The text was updated successfully, but these errors were encountered: