![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
requirejs-es2015
Advanced tools
A RequireJS plugin to load ECMAScript 2015 modules via babel. It depends on babel-core 6.x and comes with the ES2015 preset as well as babel plugin for transforming ES2015 modules to AMD.
For transforming advanced ECMAScript syntax, it uses your projects .babelrc
, so you can
choose, which presets and plugins you want to use.
es!
prefix.babelrc
or babel-config from your package.json
Install the package either by using npm or yarn.
npm i -D requirejs-es2015
yarn add -D requirejs-es2015
To make use of the plugin, you want to modify your RequireJS config file, to contain the path to the requirejs-es2015 package as well as an optional file extension that is used by your ES2015 files.
It should look something like this:
requirejs.config({
// ...
paths: {
es: 'node_modules/requirejs-es2015/es'
},
babel: {
fileExtension: '.js' // extension of your ES2015 files - defaults to .js
}
// ...
});
You can now import ES2015 modules in your RequireJS files like this:
define([
'es!myModule',
'es!components/anotherModule'
], function(myModule, anotherModule) {
myModule.method();
anotherModule.test();
});
If you want to use babel-transformations besides the built-in ES2015 preset, you can create a .babelrc
in your projects root directory (if not already present) or use the babel
section of your package.json
file.
export default
syntaxMIT
FAQs
RequireJS plugin to load ES2015 modules via babel.
The npm package requirejs-es2015 receives a total of 2 weekly downloads. As such, requirejs-es2015 popularity was classified as not popular.
We found that requirejs-es2015 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.