rulesToQuery uses ES6 export
See original GitHub issueI get this error (I am trying to use rulesToQuery
for sequelize etc.):
/home/myuser/myproject/node_modules/@casl/ability/extra.js:134
export { rulesToQuery, permittedFieldsOf, packRules, unpackRules };
^^^^^^
SyntaxError: Unexpected token export
Can I somehow have a ES5 version of rulesToQuery
as so far I did not compile with Babel and prefer things to stay that way (most recent node 10.5.0 still does not support export
).
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
ES6 Modules and How to Use Import and Export in JavaScript
The ES2015 (ES6) edition of the JavaScript standard gives us native support for modules with the import and export syntax.
Read more >Using Node.js require vs. ES6 import/export - Stack Overflow
Importing modules using ES6 import , and exporting using ES6 export. Are there any performance benefits to using one over the other? Is...
Read more >export - JavaScript - MDN Web Docs
The export declaration is used to export values from a JavaScript module. Exported values can then be imported into other programs with the ......
Read more >16. Modules - Exploring JS
An ES6 module can pick a default export, the main exported value. Default exports are especially easy to import. The following ECMAScript 6...
Read more >JavaScript ES6/CommonJS syntax - AWS SDK for JavaScript
ES6 requires you use Node.js version 13.x or higher. ... Convert all ES6 export statements to CommonJS module.exports statements. For example, convert:.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yeah, with version 2.4.1 it is good now!
Meanwhile the workaround is this: