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

Can't use Closure Compiler if node.js detected #29

Open
kryger opened this issue Oct 17, 2013 · 1 comment
Open

Can't use Closure Compiler if node.js detected #29

kryger opened this issue Oct 17, 2013 · 1 comment

Comments

@kryger
Copy link

kryger commented Oct 17, 2013

Since 2.0.0 node.js is automatically detected in the env and used if available. This makes it impossible to use Closure Compiler when node.js is available:

Error: optimizer with name of "closure" not found for this environment

I believe there are three solutions:

  1. Add a configuration flag to disable autodetecting node.js
  2. If optimize: 'closure' detected, always use Rhino to prevent the error
  3. Use node.js for tracing dependencies but Rhino for minification if Closure Compiler used (I doubt it's technically possible since that's handled by r.js, but perhaps someone will come up with ideas?)
@kryger
Copy link
Author

kryger commented Oct 17, 2013

I see the behaviour was essentially introduced in commit 26450a8 , the original pull request from @skwakman included the runner config option. Perhaps reconsidering it as an optional flag would be an acceptable solution?

Currently upgrading to 2.0.0 breaks the build for projects that use Closure Compiler in environments with node.js installed.

gfouquet added a commit to gfouquet/requirejs-maven-plugin that referenced this issue Nov 6, 2013
… one can specify if he wants to use rhino or node. It defaults to nodejs
gfouquet added a commit to gfouquet/requirejs-maven-plugin that referenced this issue Jan 6, 2014
… one can specify if he wants to use rhino or node. It defaults to nodejs
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

1 participant