Gathering detailed insights and metrics for ts-blink-tsconfig-paths-webpack-plugin
Gathering detailed insights and metrics for ts-blink-tsconfig-paths-webpack-plugin
Gathering detailed insights and metrics for ts-blink-tsconfig-paths-webpack-plugin
Gathering detailed insights and metrics for ts-blink-tsconfig-paths-webpack-plugin
npm install ts-blink-tsconfig-paths-webpack-plugin
70.7
Supply Chain
95.6
Quality
73.7
Maintenance
100
Vulnerability
100
License
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
601 Stars
174 Commits
51 Forks
9 Watching
7 Branches
26 Contributors
Updated on 26 Nov 2024
Minified
Minified + Gzipped
TypeScript (98.6%)
JavaScript (1.4%)
Cumulative downloads
Total Downloads
Last day
-5.9%
257
Compared to previous day
Last week
-6.2%
1,475
Compared to previous week
Last month
-3.7%
6,058
Compared to previous month
Last year
2,839.4%
122,398
Compared to previous year
Use this to load modules whose location is specified in the paths
section of
tsconfig.json
when using webpack. This package provides the functionality of
the tsconfig-paths package but
as a webpack plug-in.
Using this plugin means that you should no longer need to add alias
entries in
your webpack.config.js
which correspond to the paths
entries in your
tsconfig.json
. This plugin creates those alias
entries for you, so you don't
have to!
NOTE: If you are using webpack 4 you need to use version >= 3.0.0 (which is aso backwards compatible with webpack 3).
yarn add --dev tsconfig-paths-webpack-plugin
or
npm install --save-dev tsconfig-paths-webpack-plugin
In your webpack config add this:
1const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin'); 2 3module.exports = { 4 ... 5 resolve: { 6 plugins: [new TsconfigPathsPlugin({/* options: see below */})] 7 } 8 ... 9}
Notice that the plugin is placed in the resolve.plugins
section of the configuration. tsconfig-paths-webpack-plugin
is a resolve plugin and should only be placed in this part of the configuration. Don't confuse this with the plugins array at the root of the webpack configuration object.
If you're using allowJs
in tsconfig.json
, or allow other non-TS extensions in webpack, make sure you set extensions
option in sync with your webpack config.
Allows you to specify where to find the TypeScript configuration file.
You may provide
tsconfig-paths
package. The search will start at cwd
.cwd
.The use of
cwd
as default above is not optimal but we've found no better solution yet. If you have a suggestion please file an issue.
An array of the extensions that will be tried during resolve. Ideally this would be the same as the extensions from the webpack config but it seems resolver plug-ins does not have access to this information so you need to specify it again for the plugin.
This allows you to override the baseUrl
found in tsconfig.json. The baseUrl specifies from which directory paths
should be resolved. So this option enabled you to resolve from another directory than the one where tsconfig.json is located. This can be useful if you want to use webpack with tsc --watch
instead of a typescript loader. If this option is undefined
then the baseUrl
from tsconfig.json will be used.
An array of the field names that should be considered when resolving packages. Ideally this would be the same as the mainFields from the webpack config but it seems resolver plug-ins does not have access to this infomration so you need to specify it again for the plugin.
If true, no console.log messages will be emitted. Note that most error messages are emitted via webpack which is not affected by this flag.
Can be info
, warn
or error
which limits the log output to the specified
log level. Beware of the fact that errors are written to stderr and everything
else is written to stderr (or stdout if logInfoToStdOut is true).
If false
, disables built-in colors in logger messages.
This is important if you read from stdout or stderr and for proper error handling. The default value ensures that you can read from stdout e.g. via pipes or you use webpack -j to generate json output.
Support for Typescript Project References.
This package has typescript typings included. If your webpack config is using typescript, you can use this syntax to import the default export:
1import TsconfigPathsPlugin from "tsconfig-paths-webpack-plugin";
Or you can use this syntax to import the named export:
1import { TsconfigPathsPlugin } from "tsconfig-paths-webpack-plugin";
To run the provided example:
yarn example
yarn version --patch
yarn version --minor
yarn version --major
This project uses work done in the awesome-typescript-loader.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
1 existing vulnerabilities detected
Details
Reason
7 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 6
Reason
Found 10/30 approved changesets -- score normalized to 3
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More