Skip to content

Error with hot reloading and "-d": "SyntaxError: missing ) after argument list" #18

@alvaro-cuesta

Description

@alvaro-cuesta

This is style-loader@~0.8.0. My *.styl loader looks like this: { test: /\.styl$/, loader: 'style!css!stylus' }.

The offending lines (specifically the one with module.hot.accept):

if(true) {
    // When the styles change, update the <style> tags
    module.hot.accept(/*! !../~/css-loader!../~/stylus-loader!./viewer.styl */ 2/*! !../~/css-loader!../~/stylus-loader!./viewer.styl */ 2, function() {
        var newContent = __webpack_require__(/*! !../~/css-loader!../~/stylus-loader!./viewer.styl */ 2);
        if(typeof newContent === 'string') newContent = [module.id, newContent, ''];
        update(newContent);
    });
    // When the module is disposed, remove the <style> tags
    module.hot.dispose(function() { update(); });
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions