angular-hammer icon indicating copy to clipboard operation
angular-hammer copied to clipboard

index.js made Webpack include Angular twice

Open madflow opened this issue 8 years ago • 0 comments

This is a quick hint for anyone having the same problem and using Webpack. Due to angular-hammer we had Angular duplicated in chunks.

The code in index.js made Webpack include Angular twice.

var angular = require('angular');
Hammer = require('hammerjs');
require('./angular.hammer');

A fix is described here:

https://github.com/webpack/webpack/issues/2134

Or import it differently I guess:

import hammerAngular from 'angular-hammer/angular-hammer';

madflow avatar Sep 28 '17 14:09 madflow