
Security News
Node.js Considers Public Workflow for Security Reports Amid AI-Driven Surge
Node.js is debating whether AI-driven security report volume warrants moving more vulnerability reports into public workflows.
alias-reuse
Advanced tools
Reuse custom or existing aliases from one configuration in others.
.
npm i alias-reuse --save-dev
.
Import aliases from existing configuration. The library will automatically detect the configuration source type.
Supported configuration sources:
tsconfigwebpack / viteobjectreuse().from(pathToConfig: string);
... and also from custom object.
reuse().from(config: Record<string, string>);
Set custom root directory.
reuse().from(...).at(pathToRoot: string);
Export of aliases in a required configuration target.
Supported configuration targets:
tsconfigwebpack / vitejestobjectreuse().from(...).for(target: string);
.
const { reuse } = require('alias-reuse');
const tsconfigPath = path.join(__dirname, 'tsconfig.json');
module.exports = {
resolve: {
alias: reuse()
.from(tsconfigPath) // Import aliases from tsconfig.json
.for("webpack"), // And convert to webpack format
},
// ...
};
const { reuse } = require('alias-reuse');
const configPath = path.join(__dirname, 'configs/aliases.json');
module.exports = {
compilerOptions: {
paths: reuse()
.from(configPath) // Import aliases from custom config
.for("tsconfig"), // And convert to tsconfig format
},
// ...
};
const { reuse } = require('alias-reuse');
const rootPath = path.join(__dirname, 'root');
const configPath = path.join(__dirname, 'configs/aliases.json');
module.exports = {
resolve: {
alias: reuse()
.from(configPath) // Import aliases from custom config
.at(rootPath) // Set root directory
.for("vite"), // And convert to vite format
},
// ...
};
FAQs
Reuse custom or existing aliases from one configuration in others
We found that alias-reuse demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Node.js is debating whether AI-driven security report volume warrants moving more vulnerability reports into public workflows.

Security News
PolinRider expands across npm, Packagist, Go modules, and Chrome extensions, using hidden loaders to target developer environments.

Security News
Open source attacks are accelerating as AI coding agents pull in dependencies faster, with less human review.