Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Optimization fails when plugin is combined with 'empty:' scheme #493

akleiman opened this Issue Jul 26, 2013 · 2 comments


None yet
2 participants

In main.js I have something like the following configuration:

paths: {
remotedata: '//locationofremotedata'

And in my call to require, as a dependency:

[..., 'text!remotedata', ...]

Without optimization, this works fine. When using the optimizer, it tries to read from the remote location, so as per here in my app.build.js I defined paths as:

paths: {
remotedata: 'empty:'

However, when I run it I get "Error: ENOENT, no such file or directory 'empty:'"

If I remove the 'text!' from my main.js the build stops failing. I've tried this with the json plugin from requirejs-plugins and had the same result.

Versions: r.js: 2.1.8, RequireJS: 2.1.8, UglifyJS2: 2.3.6, UglifyJS: 1.3.4


jrburke commented Jul 26, 2013

This is more of a problem with the text plugin -- it should probably not try to fetch the text for empty:. If you are using the requirejs text plugin best to file the issue there. Sorry for the short reply, I'm packing for a trip -- if you open the other ticket it may be about a week before I can get to it.

@jrburke jrburke closed this Jul 26, 2013

Thanks, I'll open a ticket there. No worries on the timeframe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment