You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current webpack typescript setup in the readme: is off. First off, it doesn't import path, and thus doesn't even run.
Secondly, it fails miserably, if the files in the '/stories/' folder is typescript, as it'sn ot listed in the include param.
A webpack config that works looks something like this:
// load the default config generator.constgenDefaultConfig=require('@storybook/react/dist/server/config/defaults/webpack.config.js');constpath=require('path');module.exports=(baseConfig,env)=>{constconfig=genDefaultConfig(baseConfig,env);// Extend it as you need.// For example, add typescript loader:config.module.rules.push({test: /\.(ts|tsx)$/,include: [path.resolve(__dirname,'../src'),path.resolve(__dirname,'../stories'),],loader: require.resolve('awesome-typescript-loader'),});config.resolve.extensions.push('.ts','.tsx');returnconfig;};
The text was updated successfully, but these errors were encountered:
The current webpack typescript setup in the readme: is off. First off, it doesn't import path, and thus doesn't even run.
Secondly, it fails miserably, if the files in the '/stories/' folder is typescript, as it'sn ot listed in the include param.
A webpack config that works looks something like this:
The text was updated successfully, but these errors were encountered: