🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

ts-rootdirs-webpack-plugin

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

ts-rootdirs-webpack-plugin

Resolve tsconfig.compilerOptions.rootDirs.

latest
Source
npmnpm
Version
0.0.3
Version published
Maintainers
1
Created
Source

ts-rootdirs-webpack-plugin

Resolve tsconfig.compilerOptions.rootDirs.

Usage

Install

npm i -D ts-rootdirs-webpack-plugin

Config

// webpack.config.js
const webpackplugin = new (require('ts-rootdirs-webpack-plugin')).default();

module.exports = {
  ...
  resolve: {
    plugins: [webpackplugin]
  }
}

Example

// tsconfig.json
{
  "compilerOptions": {
    ...
   "rootDirs": ["locale/zh", "locale/a/b/c/#{locale}"],
    ...
  }
}
import locale from '../../locale/a/b/c/#{locale}/message.json';
   ||
   ▽
const message_json_1 = __importDefault(__webpack_require__(/*! ../../locale/zh/message.json */ "./locale/zh/message.json"));

FAQs

Package last updated on 13 Apr 2019

Did you know?

Socket

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.

Install

Related posts