[SOLVED] Npm module's scss in packages


#1

Hello,

How can i use bootstrap-scss in a custom package ?

i my package.js, i did :

api.use([
  'fourseven:scss@3.4.3'
]);

api.addFiles('ui/imports.scss', 'client', {isImport: true});

and my imports.scss look like this :

@import '{}/node_modules/bootstrap-sass/assets/stylesheets/_bootstrap.scss';
@import '{}/components/users/login.scss';

my login.scss look :

.login-form-container{
  max-width: 280px;
  padding: 15px;
  margin: 50px auto 0px;
}

but i have nothing in the merged css on the browser.

i also tried the following in the imports.scss :

@import '{bootstrap-sass}/node_modules/bootstrap-sass/assets/stylesheets/_bootstrap.scss';
@import '{ravidhu:my-package}/components/users/login.scss';

and

@import '{}/node_modules/bootstrap-sass/assets/stylesheets/_bootstrap.scss';
@import '/components/users/login.scss';

#2

So i found the solution :

@import ‘…/…/node_modules/bootstrap-sass/assets/stylesheets/_bootstrap.scss’;
@import ‘components/users/login.scss’;