Skip to content
This repository was archived by the owner on Apr 8, 2020. It is now read-only.
This repository was archived by the owner on Apr 8, 2020. It is now read-only.

Hot Module Reloading using typescript only (without babel) doesn't work #498

@Maarten88

Description

@Maarten88

I read about the new typescript 2.1 release and figured it should be possible to remove babel from my ReactReduxSpa-derived webpack config, which I tried.
It works, but it broke HMR. This seems to be caused by the aspnet-webpack-react module checking explicitly for babel-loader in HotModuleReplacement:

if (loaderConfig.loader && (loaderConfig.loader.match(/\bbabel-loader\b/))

If I change this line to:

if (loaderConfig.loader && (loaderConfig.loader.match(/\bbabel-loader\b/) || loaderConfig.loader.match(/\bawesome-typescript-loader\b/))) {

HMR starts working again. I added a check for awesome-typescript-loader which I use, the original uses ts-loader. My change might break the original config. Not sure how to do this correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions