Skip to content

Webpack support #54

@simonnilsson

Description

@simonnilsson

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",

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions