Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

Doesn't work with minification. #137

Closed
quadrupleslap opened this issue Dec 15, 2015 · 4 comments
Closed

Doesn't work with minification. #137

quadrupleslap opened this issue Dec 15, 2015 · 4 comments

Comments

@quadrupleslap
Copy link

For example, when using Closure Compiler, the code changes module.exports to module.c, and when this is run with exec (in loader.js), module.exports is an empty object, leading to errors. Is there a way to run the plugin before minification by ClosureCompilerPlugin?

@Maxlufs
Copy link

Maxlufs commented Mar 10, 2016

+1
I been using https://github.com/roman01la/webpack-closure-compiler/
but after minification by gcc in ADVANCED mode, module.exports became module.c, since it wasn't in the form of module['exports'], it returns {} (it just does not compile at all) on https://github.com/webpack/extract-text-webpack-plugin/blob/master/loader.js#L97, which gives error

ERROR in ./main.css
Module build failed: TypeError: text.forEach is not a function

@Maxlufs
Copy link

Maxlufs commented Mar 10, 2016

and when i run in SIMPLE mode, it does return the same string as UglifyJS (since module.exports is back now), but then an error occurs, i think with gcc internal code,

Caught error:  [Error: xxx.min.css from Closure Compiler
The compiler is waiting for input via stdin.
stdin:1: ERROR - Parse error. primary expression expected
body,blockquote,code,dd,div,dl,dt,fieldset,form,h1,h2,h3,h4,h5,h6,input,legend,li,ol,......

@alexander-akait
Copy link
Member

alexander-akait commented Aug 18, 2017

@quadrupleslap @Maxlufs problem still exists? It yes please provide minimum reproducible test repo, thanks!

@alexander-akait
Copy link
Member

Closing due to inactivity. Please test with latest version and feel free to reopen if still regressions. Also please use official closure plugin https://github.com/webpack-contrib/closure-webpack-plugin. Feel free to feedback. Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants