webpack#HotModuleReplacementPlugin TypeScript Examples

The following examples show how to use webpack#HotModuleReplacementPlugin. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: webpack.dev.ts    From react-typescript-boilerplate with MIT License 6 votes vote down vote up
devConfig = merge(commonConfig, {
    mode: 'development',
    // 如果觉得还可以容忍更慢的非 eval 类型的 sourceMap,可以搭配 error-overlay-webpack-plugin 使用
    // 需要显示列号可以切换成 eval-source-map
    devtool: 'cheap-module-eval-source-map',
    plugins: [
        new ForkTsCheckerWebpackPlugin({
            typescript: {
                memoryLimit: 1024,
                configFile: resolve(PROJECT_ROOT, './src/tsconfig.json'),
            },
        }),
        new HotModuleReplacementPlugin(),
    ],
})