Skip to content

ERROR when Uglify #3

Closed
Closed
@eric7578

Description

@eric7578

I am using the drafjs-mention-plugin, but when I try to build in the production, I got this error.
The version of the mention-plugin is 2.1.0

ERROR in vendor.c0939953.js from UglifyJs

I digging into the node_modules/find-with-regex/build/index.js
I found that maybe it's the first line of the following code that causing this error

import 'draft-js';

var findWithRegex = function findWithRegex(regex, contentBlock, callback) {
  // Get the text from the contentBlock
  var text = contentBlock.getText();
  var matchArr = void 0;
  var start = void 0; // eslint-disable-line
  // Go through all matches in the text and return the indizes to the callback
  while ((matchArr = regex.exec(text)) !== null) {
    // eslint-disable-line
    if (matchArr.index === regex.lastIndex) {
      regex.lastIndex++;
    }
    start = matchArr.index;
    callback(start, start + matchArr[0].length);
  }
};

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