简体   繁体   中英

Import susy in Ember application

Have you tried to include Susy in your Ember application? I have tried it with different approaches but they don't work.

  • Install susy as npm module using npm install susy.
  • Install susy with the ember-cli.
  • Install susy and use eyeglass.

The build finishes ok but there is a problem with the import (it is not importing the susy file). I'm trying the options below:

@import 'node_modules/susy/sass/susy.scss'

@import '../../node_modules/susy/sass/susy.scss'
@import 'susy' (with eyeglass)

Have you run into the same issue before?

Thanks in advance

I have no idea what suzy is but:

  1. if you need to use a node module that was not adopted to run in browser and not available as ember module, you can use ember-browserify .

  2. If you need to use some library that runs in browser but distributed only through npm or if you want to use npm instead of bower, you can use ember-cli-node-assets

UPD : To import 3rd-party scss files you can use includePath option of ember-cli-sass as shown in this example

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM