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

[feature request] RegExp support for ignore option #73

Closed
Andarist opened this issue Oct 3, 2018 · 5 comments
Closed

[feature request] RegExp support for ignore option #73

Andarist opened this issue Oct 3, 2018 · 5 comments

Comments

@Andarist
Copy link

Andarist commented Oct 3, 2018

use case - I'd like to ignore all of those at once:

import _extends from '@babel/runtime/helpers/esm/extends';
import _objectWithoutPropertiesLoose from '@babel/runtime/helpers/esm/objectWithoutPropertiesLoose';
import _inheritsLoose from '@babel/runtime/helpers/esm/inheritsLoose';
import _assertThisInitialized from '@babel/runtime/helpers/esm/assertThisInitialized';
@ai
Copy link
Owner

ai commented Oct 3, 2018

Try ignore: "@babel/runtime"

@Andarist
Copy link
Author

Andarist commented Oct 3, 2018

Oh I haven't noticed that there is |/ at the ned of your created RegExp here

This results with an error:

ERROR in react-textarea-autosize.esm.browser.js from UglifyJs
Unexpected character '@' [react-textarea-autosize.esm.browser.js:91,17]
    at runWebpack.then.stats (/Users/mateuszburzynski/Desktop/react-textarea-autosize/node_modules/size-limit/index.js:201:15)
    at process._tickCallback (internal/process/next_tick.js:68:7)

But is a separate problem, not directly related to this issue. I still believe that this feature request has merit, but it seems that I personally won't need it, so I'll leave it to you to decide if you want to close it.

Thanks!

@ai
Copy link
Owner

ai commented Oct 3, 2018

@Andarist no, we can keep the discussion here. It is some UglifyJS issue. Here is full error:

    ERROR in index.js from UglifyJs
    Unexpected character '@' [index.js:119,17]

Do you have any ideas?

Maybe @babel/runtime contain some non-JS content?

@Andarist
Copy link
Author

Andarist commented Oct 3, 2018

Actually I think this is webpack issue - gonna try to fix it.

This is the part of the output responsible for externals:

/* 0 */
/***/ (function(module, exports) {

module.exports = @babel/runtime/helpers/esm/extends;

/***/ }),
/* 1 */
/***/ (function(module, exports) {

module.exports = @babel/runtime/helpers/esm/assertThisInitialized;

/***/ }),
/* 2 */
/***/ (function(module, exports) {

module.exports = react;

/***/ }),
/* 3 */
/***/ (function(module, exports) {

module.exports = @babel/runtime/helpers/esm/objectWithoutPropertiesLoose;

/***/ }),
/* 4 */
/***/ (function(module, exports) {

module.exports = @babel/runtime/helpers/esm/inheritsLoose;

/***/ }),

So while it works with react as its a valid identifier, it doesnt work well with scoped packages.

@ai
Copy link
Owner

ai commented Oct 3, 2018

Cool, I am closing the issue :D

@ai ai closed this as completed Oct 3, 2018
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

2 participants