Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
docusaurus-plugin-module-alias
Advanced tools
A tiny docusaurus 2 plugin for easy module alias creation
A small Docusaurus 2.x plugin that simplifies the addition of module aliases.
npm i --save-dev docusaurus-plugin-module-alias # or
yarn add docusaurus-plugin-module-alias --dev
Docusaurus 2.x uses webpack to build SSR and client bundles. Creating a plugin to add a module alias for every new docusaurus site can be easily modularized.
Inside your docusaurus.config.js
add to the plugins
field and configure with
the alias
option :+1:
const path = require("path");
module.exports = {
// ...
plugins: [
[
"docusaurus-plugin-module-alias",
{
alias: {
"@local/component": path.resolve(__dirname, "../src/index.js"),
},
},
],
],
};
Docusaurus has special aliases that shouldn't be overridden: @site
,
@generated
, @docusaurus
, ~docs
, ~blog
, ~pages
, ~debug
Name | Type | Required | Description |
---|---|---|---|
alias | Record<string, string> | Yes | Aliases passes to webpack |
mergeStrategy | Record<string, string> | No | Change the merge strategy used by webpack-merge . Use with caution! |
FAQs
A tiny docusaurus 2 plugin for easy module alias creation
We found that docusaurus-plugin-module-alias 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
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.