Security News
Bun 1.2 Released with 90% Node.js Compatibility and Built-in S3 Object Support
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
babel-plugin-compact-reexports
Advanced tools
A Babel plugin to make re-export modules more compact
Allows ES modules which just re-export contents of other modules to be more compact; saving you bytes over the wire.
This plugin is designed to work with loader.js, but could work with any AMD loader that supports a similar alias
API.
Original discussion: ember-engines/ember-engines#265
Given a re-export module:
// my-module.js
export { default } from 'their-module';
When using AMD, this would normally compile to something like:
define('my-module', ['exports', 'their-module'], function (exports, _theirModule) {
'use strict';
Object.defineProperty(exports, 'default', {
enumerable: true,
get: function get() {
return _theirModule['default'];
}
});
});
Which is pretty verbose for a simple re-export. This plugin will rewrite the above to the following:
define.alias('their-module', 'my-module');
FAQs
A Babel plugin to make re-export modules more compact
The npm package babel-plugin-compact-reexports receives a total of 7,690 weekly downloads. As such, babel-plugin-compact-reexports popularity was classified as popular.
We found that babel-plugin-compact-reexports demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.