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

Path normalization in v0.19.29-31 #1348

Closed
danturu opened this issue Jul 1, 2016 · 7 comments
Closed

Path normalization in v0.19.29-31 #1348

danturu opened this issue Jul 1, 2016 · 7 comments

Comments

@danturu
Copy link

danturu commented Jul 1, 2016

I have a few stylesheets:

component.css:

.h1 {
  composes: primaryText from "./colors.css";
}

colors.css:

.primaryText {
  color: #0d7689;
}

When I import component.css SystemJS v0.19.29-31 fails:

System.import('app/client/components/component.css!css.js').then(r => console.log(r));

// Error loading http://0.0.0.0:7070/http:/0.0.0.0:7070/app/client/components/colors.css!http://0.0.0.0:7070/css.js

The problem is here http://0.0.0.0:7070/http:/0.0.0.0:7070/. SystemJS v0.19.28 works fine. My config.js is default. Is it a bug?

@danturu danturu changed the title Path normalizing in v0.19.29-31 Path normalization in v0.19.29-31 Jul 1, 2016
@guybedford
Copy link
Member

What CSS plugin are you using here?

@danturu
Copy link
Author

danturu commented Jul 1, 2016

@guybedford jspm-loader-css with a custom config:

import { CSSLoader, Plugins } from 'jspm-loader-css';

import postcssAutoreset from 'postcss-autoreset';
import postcssColorFunction from 'postcss-color-function';
import postcssNested from 'postcss-nested';

const { fetch, bundle } = new CSSLoader([
  postcssAutoreset,
  postcssColorFunction,
  postcssNested,
  Plugins.values,
  Plugins.localByDefault,
  Plugins.extractImports,
  Plugins.scope,
  Plugins.autoprefixer(),
], __moduleName);

export { fetch, bundle };

@guybedford
Copy link
Member

@rosendi right, yes I think jspm-loader-css may have some bugs here unfortunately. I'd suggest either posting an issue there or investigating other css plugins. You can also run a separate compilation before loading css through jspm too.

@danturu
Copy link
Author

danturu commented Jul 1, 2016

This demo also fails with latest SystemJS.

@danturu
Copy link
Author

danturu commented Jul 1, 2016

@guybedford OK, I'll post this issue there. I'm closing it for now.

@danturu
Copy link
Author

danturu commented Jul 1, 2016

@guybedford What do you mean here?

You can also run a separate compilation before loading css through jspm too.

@guybedford
Copy link
Member

I mean you could use a custom build process through another system before providing the generated css to SystemJS as well.

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