xpepermint / angular-ui-switch

On/off switch button for AngularJS. DEPRECATED!
278 stars 125 forks source link

Webpack support #54

Open simonnilsson opened 8 years ago

simonnilsson commented 8 years ago

To support webpack and npm the module should require the css file. It is also common practice to export the angular modules name. I would recommend creating a index.js file like the one below. This file should also be referenced in package.json main-field instead of "angular-ui-switch.js".

index.js

require('./angular-ui-switch.css');
require('./angular-ui-switch.js');
module.exports = 'uiSwitch';

package.json

"main": "index.js",