alias-jsconfig-webpack-plugin

1.0.2 • Public • Published

webpack plugin

convert alias to jsconfig.json or tsconfig.json

how to use

npm i --save-dev alias-jsconfig-webpack-plugin

in webpack.config.js:

const Alias = require('alias-jsconfig-webpack-plugin');
 
// ...plugins
export default {
    // your other config
    // ...
    plugins: [
        // your other plugins
        new Alias({
            language: 'js', // or 'ts'
            jsx: true, // default to true,
            indentation: 4, // default to 4, the indentation of jsconfig.json file
        }),
    ]
}

what it can do

when there is no jsconfig/tsconfig.json file, this plugin with generater one with the alias in webpack will be written into paths for vscode to find it.

if there had this file, it will rewrite the paths with the alias read from webpack.

Package Sidebar

Install

npm i alias-jsconfig-webpack-plugin

Weekly Downloads

5

Version

1.0.2

License

ISC

Unpacked Size

3.64 kB

Total Files

3

Last publish

Collaborators

  • yuzai