-
Notifications
You must be signed in to change notification settings - Fork 5
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
怎么用?大佬 example调试就报错啊,貌似编辑器不支持模块的语法 ,怎么解决 #1
Comments
Which environment do you use this in? nodejs or browser? |
nodejs/webstrom11.0 import JsExcelTemplate from "js-excel-template/nodejs/nodejs"; SyntaxError: Unexpected token import I search for the use of the import, I found my editor does not support。 |
I believe it's out of scope of this library, you may need a babel plugin like: http://babeljs.io/docs/plugins/transform-es2015-modules-commonjs/ |
I did as you said ,but can‘t run,For a primary noder seems to be difficult to use,only be able to use the module after require。 |
You may need this: const JsExcelTemplate = require("js-excel-template/nodejs/nodejs").default;
const excelTemplate = JsExcelTemplate.fromFile("demo/test.xlsx"); |
wow ! wow! it works, Thank you very much dalao, your model very very helpful to me,.thanks again |
用babel转译下,只能转译一部分,总之就是用不成
The text was updated successfully, but these errors were encountered: