Skip to content

WebPack fails to load ngTable due to previous minfication #1044

@BonsaiDen

Description

@BonsaiDen

I'm trying to load ng-table via bower-webpack, this all works fine as the module is correctly found and included in the WebPack bundle, however once it is required the following error is thrown on the console:

Uncaught ReferenceError: returntrue is not defined

It seems like the source gets corrupted during compilation, as inspecting the bundle yields the following line of code:

!function(a,b){"use strict";returntrue?void !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! angular */ 13)], ..... 

The original source is already modified and adding a space in front of the "function" string gets rid of the above error.

/*! ngTable v0.5.3 by Vitalii Savchuk(esvit666@gmail.com) - https://github.com/esvit/ng-table - New BSD License */

!function(a,b){"use strict";return"function"==typeof define&&define.amd?void define(["angular"], ....

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions