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

How to import breakpoint with webpack? #167

Open
captainkovalsky opened this issue May 7, 2016 · 5 comments
Open

How to import breakpoint with webpack? #167

captainkovalsky opened this issue May 7, 2016 · 5 comments

Comments

@captainkovalsky
Copy link

captainkovalsky commented May 7, 2016

Hi guys,

I've installed susy and sass, after that include css/sass loader to webpack config

{ test: /\.scss$/, loader: ExtractTextPlugin.extract('css!sass') }

Here is my main scss file

@import "~susy/sass/susy";
@import "breakpoint";

$susy: (
  columns: 12,
  gutters: 1/4,
  math: fluid,
  output: float,
  gutter-position: inside
);

.layout {
  @include container();
  @include layout(12 1/4);
}

This is an error in a webpack output

ERROR in ./src/styles/base.scss
Module build failed: ModuleBuildError: Module build failed: 
@import "breakpoint";
^
      File to import not found or unreadable: breakpoint

gems which are installed

viktors-mbp:~ viktor$ gem list breakpoint sass compass

*** LOCAL GEMS ***

breakpoint (2.7.0)

*** LOCAL GEMS ***

sass (3.4.22)
sassy-maps (0.4.0)

*** LOCAL GEMS ***

compass (1.1.0.alpha.3, 1.0.3)
compass-core (1.1.0.alpha.3, 1.0.3)
compass-import-once (1.0.5)
viktors-mbp:~ viktor$ 

Does anyone know how to properly import breakpoint ?

@ShaunKT
Copy link

ShaunKT commented May 28, 2016

Have a look at http://hownodejs.com/39/01/how-to-import-ruby-gems-breakpoint-with-webpack.html it seems to have a solution

@ignaciosegura
Copy link

Assuming you installed breakpoint-sass package:

npm install breakpoint-sass --save-dev

Then you have to import it letting the SASS loader know that this element you want to import, that is, "breakpoint", is outside the SASS folder, with the other node modules:

@import '~breakpoint-sass/stylesheets/breakpoint';

@tavurth
Copy link

tavurth commented Mar 10, 2018

Perhaps we could add this to the Readme, or rather the wiki?

@galakhov
Copy link

galakhov commented Sep 17, 2018

Yes, please add this line to the "Installation" section to the project's wiki:

npm i -D breakpoint-sass

and this line to the "Using Breakpoint":

@import "../node_modules/breakpoint-sass/stylesheets/_breakpoint";

@Tamenze
Copy link

Tamenze commented Apr 10, 2020

+1 on the wiki edit

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

6 participants