ts-paths-to-webpack-alias

0.3.1 • Public • Published

ts-paths-to-webpack-alias

Webpack plugin which resolves TypeScript paths to Webpack alias paths.

Install

yarn add ts-paths-to-webpack-alias --dev

or

npm install ts-paths-to-webpack-alias -D

Usage

In the Webpack config add the plugin:

const ResolveTSPathsToWebpackAlias = require('ts-paths-to-webpack-alias')

/* ...webpack config */

plugins: [
  new ResolveTSPathsToWebpackAlias({
    tsconfig: pathToTSConfigFile
  })
]

Options

Required

  • tsconfig: The path to the tsconfig.json file used for the project.

Optional

  • context: Provide a context for the TypeScript file paths. The default value is the Webpack context.

/ts-paths-to-webpack-alias/

    Package Sidebar

    Install

    npm i ts-paths-to-webpack-alias

    Weekly Downloads

    2

    Version

    0.3.1

    License

    Apache-2.0

    Unpacked Size

    13.6 kB

    Total Files

    5

    Last publish

    Collaborators

    • chrisabrams