Skip to content

Instantly share code, notes, and snippets.

@seeliang
Created January 19, 2022 23:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save seeliang/23b2cbb8ace88955ea28c2c6112d61e9 to your computer and use it in GitHub Desktop.
Save seeliang/23b2cbb8ace88955ea28c2c6112d61e9 to your computer and use it in GitHub Desktop.
add ts node module support for storybook
module.exports = {
...settings
webpackFinal: async (config) => {
const update = config
update.module.rules.push({
test: /\.(ts|tsx)$/,
loader: 'ts-loader',
include: /node_modules/,
options: {
allowTsInNodeModules: true,
compilerOptions: {
noEmit: false,
},
},
});
// Return the altered config
return update;
},
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment