Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webpack support #54

Open
simonnilsson opened this issue Oct 18, 2016 · 0 comments
Open

Webpack support #54

simonnilsson opened this issue Oct 18, 2016 · 0 comments

Comments

@simonnilsson
Copy link

simonnilsson commented Oct 18, 2016

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",
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant