Giter Site home page Giter Site logo

Comments (7)

jhnns avatar jhnns commented on May 20, 2024

And bootstrap is placed in my app under /components/bootstrap. 😄

from less-loader.

sokra avatar sokra commented on May 20, 2024
@import "~bootstrap/less/reset.less";
@import "~bootstrap/less/grid.less";

It cannot be @import "bootstrap/less/reset" because this would mean the folder bootstrap

from less-loader.

jhnns avatar jhnns commented on May 20, 2024

Ah thx

from less-loader.

jupl avatar jupl commented on May 20, 2024

I'm having issues getting this to work. In a test, I created a file with the line

@import '~bootstrap/less/normalize.less';

and I get the error:

Module build failed: Error: Cannot resolve module node_modules/bootstrap/less/variables.less

I do have Bootstrap downloaded under node_modules.

from less-loader.

jhnns avatar jhnns commented on May 20, 2024

How did you install bootstrap into node_modules? Via npm? The bootstrap-module on npm is not Twitter Bootstrap.

I think it's better to download bootstrap via bower and add this line to your webpack.config.js:

config.resolve.modulesDirectories = ["bower_components", "node_modules"];

from less-loader.

jupl avatar jupl commented on May 20, 2024

Ugh, I'm such a dunce. I screwed up my modulesDirectories during some late-night coding. I got it to work. Anyway, in case you're curious I just added Bootstrap to package.json as a tarball to reduce having to rely on extra tools:

"bootstrap": "https://github.com/twbs/bootstrap/archive/v3.1.1.tar.gz"

Thanks for the help! :D

from less-loader.

jhnns avatar jhnns commented on May 20, 2024

Ah ok. I'm glad it finally worked 😉

from less-loader.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.