tjx666 / awesome-chrome-extension-boilerplate

Use react + typescript + webpack to enhance your chrome extension development experience
MIT License
408 stars 44 forks source link

错误提示怎么不满屏提示? #28

Closed huangfh closed 2 years ago

huangfh commented 2 years ago

插件有报错时,会满屏的错误提示。怎么给取消?

tjx666 commented 2 years ago

步骤 1:

server/utils/entry.ts 中搜索 overlay=true,置为 false.

步骤 2:

修改 server/configs/webpack.dev.ts:

const devConfig = merge(commonConfig, {
    mode: 'development',
    devtool: 'eval-source-map',
    plugins: [
        new HotModuleReplacementPlugin(),
        // 修改这里 overlay 置为 false
        new ReactRefreshWebpackPlugin({
            overlay: false,
        }),
        new ForkTsCheckerWebpackPlugin({
            typescript: {
                memoryLimit: 1024,
                configFile: resolve(PROJECT_ROOT, 'src/tsconfig.json'),
            },
        }),
    ],
});