Error overlay not showing type errors #4174
-
i have migrated the app from craco to rsbuild (version import { defineConfig, loadEnv } from '@rsbuild/core';
import { pluginReact } from '@rsbuild/plugin-react';
import { pluginSass } from '@rsbuild/plugin-sass';
import { pluginSvgr } from '@rsbuild/plugin-svgr';
const { publicVars } = loadEnv({ prefixes: ['REACT_APP_'] });
import { pluginNodePolyfill } from '@rsbuild/plugin-node-polyfill';
import { pluginTypeCheck } from '@rsbuild/plugin-type-check';
import { RsdoctorRspackPlugin } from '@rsdoctor/rspack-plugin';
import { pluginEslint, type PluginEslintOptions } from '@rsbuild/plugin-eslint';
const eslintOptions: PluginEslintOptions = {
eslintPluginOptions: {
configType: 'flat',
},
};
// to enable RSDoctor - Build analyzer
const shouldEanbleRSDoctor = false;
// to enable typescripts' type check
const shouldEnableTypeCheck = false;
export default defineConfig({
plugins: [
pluginReact(),
pluginSass({
sassLoaderOptions: {
api: 'modern-compiler',
implementation: require.resolve('sass'),
sassOptions: {
silenceDeprecations: [
'color-module-compat',
'duplicate-var-flags',
'color-4-api',
'color-functions',
'global-builtin',
'import',
],
},
},
}),
pluginSvgr({ mixedImport: true }),
pluginNodePolyfill(),
pluginEslint(eslintOptions),
pluginTypeCheck({ enable: shouldEnableTypeCheck }),
],
source: {
define: publicVars,
},
// server:{
// port:4005
// },
html: {
template: './public/index.html',
},
output: {
polyfill: 'usage',
distPath: {
root: 'build',
},
},
tools: {
rspack: {
// Add support for .mjs files
module: {
rules: [
{
test: /\.mjs$/,
include: /node_modules/,
type: 'javascript/auto',
},
],
},
// ignoreWarnings: [/Deprecation Warning/],
plugins: [
shouldEanbleRSDoctor &&
new RsdoctorRspackPlugin({
disableTOSUpload: true,
linter: {
rules: {
// Don't warn about using non ES5 features
'ecma-version-check': 'off',
},
},
supports: { generateTileGraph: true },
}),
],
},
},
dev: {
client: {
overlay: true,
},
},
}); |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Please provide a minimal reproduction to help us address the issue, we cannot assist with troubleshooting based on the information currently provided. |
Beta Was this translation helpful? Give feedback.
Hi, in
rsbuild-plugin-type-check
v1.2.0, we support display type checking errors in the error overlay without specifying theasync: false
option~