Code Monkey home page Code Monkey logo

Comments (9)

EisenbergEffect avatar EisenbergEffect commented on May 3, 2024 1

When require a css file, the urls in that css file are relative to the view that it is imported inside of. For scenarios like this, I would recommend just adding it as a link in your html file. You could also use the system.js css plugin to import the css in your main.js file if you preferred.

from framework.

Aaike avatar Aaike commented on May 3, 2024

I should also note that in the standard skeleton-nav, the loading of js files in jspm_packages would not work out of the box.
if i were to use baseUrl for systemjs like the skeleton-nav does, then the loading of js files in jspm_packages would also not work, because everything is based of the baseUrl.

so using baseViewUrl solved the loading of javascript files for my package.

But because of this the view files always seem to point to the dist directory while these should point to the jspm_packages directory

from framework.

EisenbergEffect avatar EisenbergEffect commented on May 3, 2024

We are working in improvements to the loader that should resolve this. It is tracked elsewhere.

from framework.

Serhioromano avatar Serhioromano commented on May 3, 2024

@Aaike can you show your code example. I would like to know how to create Aurelia modules that could be installed with jspm.

Thank you.

from framework.

Aaike avatar Aaike commented on May 3, 2024

@Serhioromano please check out the JSPM documentation on how to configure packages for JSPM

once you have that simply load your modules using the import statement like any other jspm installable package

from framework.

yelvert avatar yelvert commented on May 3, 2024

Has this been solved? And, what is this a duplicate of?

from framework.

EisenbergEffect avatar EisenbergEffect commented on May 3, 2024

This should now be fixed on master. It's going out in the next release. Essentially, our view loading now goes through System.js and Require.js first in order to correctly map paths. Also, our plugin api has changed in order for us to be able to get the proper module id info.

from framework.

Aaike avatar Aaike commented on May 3, 2024

Fantastic !

from framework.

 avatar commented on May 3, 2024

Does this also fix the case where are required CSS sheet cannot do relative url() sourcing. E.g.

<require from="semantic-ui/semantic.css"></require>

where semantic.css then does:

@font-face {
  font-family: 'Icons';
  src: url("themes/default/assets/fonts/icons.eot");

The "themes/default/assets/fonts/icons.eot" cannot be found when building because the base directory does not seem to be set correctly.

from framework.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.