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

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

Closed
akleiman opened this issue Jul 26, 2013 · 2 comments
Closed

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

akleiman opened this issue Jul 26, 2013 · 2 comments

Comments

@akleiman
Copy link

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
Copy link
Member

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 as completed Jul 26, 2013
@akleiman
Copy link
Author

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants