
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
@storybook/preset-typescript
Advanced tools
One-line TypeScript configuration for Storybook.
First, install this preset to your project.
npm install -D @storybook/preset-typescript ts-loader fork-ts-checker-webpack-plugin # or yarn
Once installed, add this preset to the appropriate file:
./.storybook/main.js
(for Storybook 5.3.0 and newer)
module.exports = {
addons: ['@storybook/preset-typescript'],
};
./.storybook/presets.js
(for all Storybook versions)
module.exports = ['@storybook/preset-typescript'];
You can also pass extra configuration options to configure the preset. For example:
// ./storybook/main.js
const path = require('path');
module.exports = {
addons: [
{
name: '@storybook/preset-typescript',
options: {
tsLoaderOptions: {
configFile: path.resolve(__dirname, './tsconfig.json'),
},
forkTsCheckerWebpackPluginOptions: {
colors: false, // disables built-in colors in logger messages
},
include: [path.resolve(__dirname, '../src')],
transpileManager: true,
},
},
],
};
All available options are described in the Options section below.
Type: Object
undefined;
fork-ts-checker-webpack-plugin options. transpileOnly
flag needs to be set to true
in tsLoaderOptions
to be able to set options for this webpack plugin.
Type: Rule condition
undefined;
include rule for /\.tsx?$/
.
Type: Boolean
false;
Toggles TypeScript transpilation on manager side.
FAQs
TypeScript preset for Storybook
The npm package @storybook/preset-typescript receives a total of 15,272 weekly downloads. As such, @storybook/preset-typescript popularity was classified as popular.
We found that @storybook/preset-typescript demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 16 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
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.