Angular-cli: Loading google fonts with @import tag in scss doesn't work. Throws error.

Created on 2 Oct 2016  路  3Comments  路  Source: angular/angular-cli

When I do this:
// Fonts
@import 'https://fonts.googleapis.com/css?family=Raleway:100,200,300,400,500,600,700,800,900';

I get this error:

ERROR in ./~/css-loader!./~/postcss-loader!./~/sass-loader!./src/styles.scss
Module build failed: CssSyntaxError: css-loader-parser: /Users/purushottamj/workspaces/mithilatech/mithilatech-frontend/styles.scss:1:0: Unexpected formathttps://fonts.googleapis.com/css?family=Raleway:100,200,300,400,500,600,700,800,900

1 | @import https://fonts.googleapis.com/css?family=Raleway:100,200,300,400,500,600,700,800,900;

OS?

Mac OSX (Sierra)

Versions.

angular-cli: 1.0.0-beta.16
node: 4.2.4
os: darwin x6

Most helpful comment

Can you try wrapping the path with url() ? I believe this is a libsass issue and not related to angular-cli.

All 3 comments

Can you try wrapping the path with url() ? I believe this is a libsass issue and not related to angular-cli.

Wrapping it in url() works perfect. Thank you :)

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

_This action has been performed automatically by a bot._

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hartjo picture hartjo  路  3Comments

naveedahmed1 picture naveedahmed1  路  3Comments

JanStureNielsen picture JanStureNielsen  路  3Comments

rwillmer picture rwillmer  路  3Comments

NCC1701M picture NCC1701M  路  3Comments