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

Paths ending on a slash do not work in 'paths' config option #49

Closed
hay opened this issue Dec 15, 2010 · 2 comments
Closed

Paths ending on a slash do not work in 'paths' config option #49

hay opened this issue Dec 15, 2010 · 2 comments

Comments

@hay
Copy link

hay commented Dec 15, 2010

Consider a key in a paths configuration like this:

require({
    paths : {
        "foo/" : "bar/"
    }
});

The trailing slash in foo/ seems to cause problems. The require statements using this path down the line don't use the rewritten path. Doing something like:

require({
    paths : {
        "foo/foo" : "bar/bar"/
    }
});

Does work.

I made a small test case here

@jrburke
Copy link
Member

jrburke commented Dec 16, 2010

I'm thinking of just generating a useful error in this case. Although, what do you expect of these two mappings, do you think they mean the same thing?

require({
    paths: {
        "foo/": "bar/",
        "foo": "bar"
});

What is your expectation for "foo/" vs. "foo", do they mean the same thing to you, or were you trying to express something else?

@hay
Copy link
Author

hay commented Dec 17, 2010

Yes, an error seems to be the most useful solution here.

This issue was closed.
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