roman01la / webpack-closure-compiler

[DEPRECATED] Google Closure Compiler plugin for Webpack
MIT License
464 stars 25 forks source link

Clousure Compiler doesn't like `__WEBPACK_IMPORTED_MODULE_3_helpers__` #19

Closed mohsen1 closed 7 years ago

mohsen1 commented 7 years ago

I'm using Webpack 2.1 beta 27 with TypeScript that generates ES6. When I use this plugin, I get errors like this:

stdin:7597: ERROR - The class in an extends clause must be a qualified name.
class APIClientError extends __WEBPACK_IMPORTED_MODULE_3_helpers__["e" /* CustomError */] {
                             ^

Not sure how to tell CC to allow those class names? I couldn't find anything in CC documents.

mohsen1 commented 7 years ago

First I thought it's the hanging __ but changing this line to remove starting __ didn't help.

Issue is __WEBPACK_IMPORTED_MODULE_3_helpers__["e" /* CustomError */] is not a valid JavaScript class identifier for Closure Compiler but it's perfectly valid JS.

roman01la commented 7 years ago

I have no idea. According to this issue in CC repo, they do not support these kind of names https://github.com/google/closure-compiler/issues/1876#issuecomment-231138616

mohsen1 commented 7 years ago

I made another issue. a['foo'] is not dynamic. It's static.

roman01la commented 7 years ago

Nice. I'll close this issue then.