Closed chyyran closed 3 years ago
Turns out this was a problem with ForkTsCheckerWebpackPlugin
, which isn't picking up the changes in tsconfig. To fix it, the default CRA instance of the plugin has to be replaced with a custom instance
webpack: {
plugins: {
// use our own ForkTsCheckerWebpackPlugin
add: [new ForkTsCheckerWebpackPlugin({
typescript: {
configFile: 'tsconfig.json',
diagnosticOptions: {
semantic: true,
syntactic: true,
},
mode: "write-references",
},
})],
remove: ["ForkTsCheckerWebpackPlugin"], // remove forktschecker
},
},
}
Repro here (Yarn PNP):
https://github.com/SnowflakePowered/hydrogen-paper/tree/8be317e82d668528945e6aa7ce37eb223b9928c4/theme
yarn run craco start
results in the errorHowever it seems to work with
yarn storybook
.Debug output:
Then describe your problem and paste the plugin output.