Created
January 19, 2022 23:05
-
-
Save seeliang/23b2cbb8ace88955ea28c2c6112d61e9 to your computer and use it in GitHub Desktop.
add ts node module support for storybook
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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