Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

docusaurus-plugin-module-alias

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

docusaurus-plugin-module-alias - npm Package Compare versions

Comparing version 0.0.2 to 0.1.0-next.1

.editorconfig

65

package.json
{
"name": "docusaurus-plugin-module-alias",
"version": "0.1.0-next.1",
"description": "A tiny docusaurus 2 plugin for easy module alias creation",
"version": "0.0.2",
"license": "MIT",
"files": [
"dist-*/",
"bin/"
],
"pika": true,
"sideEffects": false,
"keywords": [

@@ -21,28 +14,46 @@ "docusaurus",

"repository": {
"url": "https://github.com/atomicpages/docusaurus-plugin-module-alias",
"type": "git"
"type": "git",
"url": "https://github.com/atomicpages/docusaurus-plugin-module-alias"
},
"license": "MIT",
"author": "Dennis Thompson",
"main": "./dist/cjs/index.js",
"module": "./dist/esm/index.js",
"types": "./dist/esm/index.d.ts",
"scripts": {
"test": "vitest run",
"lint": "eslint 'src/index.{ts,js,tsx}'",
"prebuild": "rm -rf dist",
"build": "npm-run-all -p build:*",
"prepare": "is-ci || husky install",
"build:esm": "esbuild --sourcemap --format=esm --target=es2019 --outdir=dist/esm ./src/index.ts",
"build:cjs": "esbuild --sourcemap --format=cjs --target=es2017 --outdir=dist/cjs ./src/index.ts",
"build:types": "tsc -p tsconfig.build.json"
},
"dependencies": {
"joi": "^17.3.0"
"superstruct": "^1.0.3"
},
"devDependencies": {
"@djthoms/eslint-config": "^3.0.0",
"@djthoms/prettier-config": "^2.0.0",
"@docusaurus/types": "^2.0.0-alpha.68",
"@pika/pack": "^0.5.0",
"@pika/plugin-build-node": "^0.9.2",
"@pika/plugin-ts-standard-pkg": "^0.9.2",
"eslint": "^7.14.0",
"prettier": "^2.2.0",
"typescript": "^4.1.2"
"@commitlint/cli": "^18.4.1",
"@commitlint/config-conventional": "^18.4.0",
"@djthoms/eslint-config": "^6.1.1",
"@djthoms/prettier-config": "^4.3.0",
"@docusaurus/types": "^3.0.0",
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"@types/node": "^20.9.0",
"@vitest/coverage-v8": "^0.34.6",
"esbuild": "^0.19.5",
"husky": "^8.0.3",
"is-ci": "^3.0.1",
"lint-staged": "^15.1.0",
"npm-run-all": "^4.1.5",
"semantic-release": "^22.0.7",
"typescript": "^5.2.2",
"vitest": "^0.34.6",
"webpack-merge": "^5.10.0"
},
"engines": {
"node": ">=6.4.0"
},
"publishConfig": {
"access": "public"
},
"source": "dist-src/index.js",
"types": "dist-types/index.d.ts",
"main": "dist-node/index.js"
}
}

@@ -14,23 +14,25 @@ # Docusaurus Plugin Module Alias

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.
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.
## Usage
Inside your `docusaurus.config.js` add to the `plugins` field and configure with the `alias` option :+1:
Inside your `docusaurus.config.js` add to the `plugins` field and configure with
the `alias` option :+1:
```js
const path = require('path');
const path = require("path");
module.exports = {
// ...
plugins: [
[
'docusaurus-plugin-module-alias',
{
alias: {
'@local/component': path.resolve(__dirname, '../src/index.js'),
},
},
],
// ...
plugins: [
[
"docusaurus-plugin-module-alias",
{
alias: {
"@local/component": path.resolve(__dirname, "../src/index.js"),
},
},
],
],
};

@@ -41,3 +43,4 @@ ```

Docusaurus has special aliases that shouldn't be overridden: `@site`, `@generated`, `@docusaurus`, `~docs`, `~blog`, `~pages`, `~debug`
Docusaurus has special aliases that shouldn't be overridden: `@site`,
`@generated`, `@docusaurus`, `~docs`, `~blog`, `~pages`, `~debug`

@@ -44,0 +47,0 @@ ## Options

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc