webpack-contrib / install-webpack-plugin

Speed up development by automatically installing & saving dependencies with Webpack.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issue with @angularclass/hmr-loader

ocombe opened this issue · comments

Hello,

I use the @angularclass/hmr-loader npm webpack plugin, but it tries to install a lib named @angularclass-loader, looks like it doesn't handle the / well.

From my webpack config:

loaders: [
            // Support for .ts files.
            {
                test: /\.ts$/,
                loaders: ['awesome-typescript', 'angular2-template', '@angularclass/hmr-loader'],
                exclude: [/\.(spec|e2e)\.ts$/]
            }

Thanks for the example! $20 says my regex didn't account for this scenario.

I'm also updating it to check if @angularclass/hmr-loader is already require.resolve-able, and skip if so.

(This would mean that this plugin is more of a fallback than a first-line defense)