Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
@ts-tools/webpack-loader
Advanced tools
TypeScript loader for webpack.
Features:
ts.transpileModule
. Leaves type checking to other flows.node_modules/.cache/ts-<moodule>-<target>
). Second run will not re-transpile a file if not changed.tsconfig.json
.devtool
configuration.Install the library as a dev dependency in an existing TypeScript project:
npm i @ts-tools/webpack-loader --save-dev
And adjust your webpack configuration to include:
module.exports = {
// ...
module: {
rules: [
{
test: /\.tsx?$/,
loader: '@ts-tools/webpack-loader',
},
],
},
resolve: {
extensions: ['.ts', '.tsx', '.mjs', '.js', '.json'],
},
// ...
};
interface ITypeScriptLoaderOptions {
/**
* Keys to override in the `compilerOptions` section of the
* `tsconfig.json` file.
*/
compilerOptions?: object;
/**
* Turn persistent caching on/off.
*
* @default true
*/
cache?: boolean;
/**
* Absolute path of an existing directory to use for persistent cache.
*
* @default uses `find-cache-dir` to search for caching path.
*/
cacheDirectoryPath?: string;
/**
* Path to `tsconfig.json` file.
* Specifying it will skip config lookup
*/
configFilePath?: string;
/**
* Name of config file to search for when looking up config.
*
* @default 'tsconfig.json'
*/
configFileName?: string;
/**
* Should loader search for config.
* Loader will search for the closest tsconfig file to the root context, and load it.
*
* @default true
*/
configLookup?: boolean;
}
Options can be provided via the webpack configuration:
module.exports = {
// ...
module: {
rules: [
{
test: /\.tsx?$/,
loader: '@ts-tools/webpack-loader',
options: {
compilerOptions: {
target: 'es5',
},
},
},
],
},
// ...
};
MIT
FAQs
TypeScript loader for webpack.
We found that @ts-tools/webpack-loader demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
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.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.