
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
@betit/rollup-plugin-rename-extensions
Advanced tools
Plugin to rename file extensions before they're emitted in rollup
Rollup plugin to take modules from RollUp and rename their file extensions. Useful for when using preserveModules. The plugin will also parse
all modules code and rewrite imports/exports to match the new file name.
npm i --save-dev @betit/rollup-plugin-rename-extensions
As an example, heres how we can convert .ts .vue to .js and .vue.js respectively.
import renameExtensions from '@betit/rollup-plugin-rename-extensions';
// Rollup Configuration
export default {
input: './src/index.js',
preserveModules: true,
/* ... */
plugins: [
// After transforms...
renameExtensions({
include: ['**/*.ts', '**/*.vue'],
mappings: {
'.vue': '.vue.js',
'.ts': '.js',
},
})
],
},
export interface IRenameExtensionsOptions {
/**
* Files to include for potential renames.
* Also denotes files of which may import a renamed module in
* order to update their imports.
*/
include?: Array<string | RegExp> | string | RegExp | null;
/**
* Files to explicitly exclude
*/
exclude?: Array<string | RegExp> | string | RegExp | null;
/**
* Generate source maps for the transformations.
*/
sourceMap?: boolean;
/**
* Babel plugins to use for parsing. Defaults to:
* `dynamicImport`, `classProperties`, `objectRestSpread`
*
* For a full list visit https://babeljs.io/docs/en/babel-parser#plugins
*/
parserPlugins?: ParserPlugin[];
/**
* Object describing the transformations to use.
* IE. Input Extension => Output Extensions.
* Extensions should include the dot for both input and output.
*/
mappings: Record<string, string>;
}
FAQs
Plugin to rename file extensions before they're emitted in rollup
The npm package @betit/rollup-plugin-rename-extensions receives a total of 317 weekly downloads. As such, @betit/rollup-plugin-rename-extensions popularity was classified as not popular.
We found that @betit/rollup-plugin-rename-extensions demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 62 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
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.

Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.

Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.