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

having trouble specifying path of css to load #230

Open
funkyvisions opened this issue Apr 11, 2017 · 1 comment
Open

having trouble specifying path of css to load #230

funkyvisions opened this issue Apr 11, 2017 · 1 comment

Comments

@funkyvisions
Copy link

funkyvisions commented Apr 11, 2017

This could totally be my misunderstanding of how to use this library, but I'm trying to use it the same way I used

https://github.com/requirejs/text

There I did the following:

define(["text!./util/inappbrowser.js", function(js) {});

The target file was relative to the baseUrl path (js) in my require.config. The resultant path is

http://localhost:8000/js/util/inappbrowser.js

I'm trying to do the same thing with this.

define(["css!../views/snippets-shared/pull-list-item"]

however the path it tries to load from comes out as

http://localhost:8000/views/views/views/views/snippets-shared/pull-list-item.css

The only way I can get this to work is to specify the path of

../../../../views/snippets-shared/pull-list-item

Is this enough info to help me diagnose what is going on?

@guybedford
Copy link
Owner

Sure, SystemJS swaps the plugin system around - define(["./views/snippets-shared/pull-list-item.css!css"]. If you prefer RequireJS style you can use System.config({ pluginFirst: true }).

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