Comments (7)
And bootstrap is placed in my app under /components/bootstrap
. 😄
from less-loader.
@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.
Ah thx
from less-loader.
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.
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.
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.
Ah ok. I'm glad it finally worked 😉
from less-loader.
Related Issues (20)
- TypeError: this.getOptions is not a function HOT 1
- less object is empty in CRA project HOT 1
- Variable @z-index not found HOT 1
- TypeError: this.getPosition is not a function HOT 1
- less loader ignore the files out side the 'root' (where webpack.config.js live in) HOT 1
- webpack less-loader css modules fail HOT 5
- Slow build of file with too many imports HOT 3
- @apply detects as variable HOT 1
- ng test error with PhantomJS , getting less error HOT 1
- facing less error in angular 12 HOT 6
- this.getOptions is not a function HOT 1
- not find prependData and apendData information in README.md HOT 1
- Confusing `imports` explanation HOT 2
- Error: Module build failed
- Quieter logging HOT 2
- Attempt to track cache dependencies for synchronous loaded resources HOT 1
- less-loader not working with webpack-dev-server hmr HOT 8
- Invalid dependencies when webpack alias same with workspace folder HOT 5
- Compilation fails if CSS variable is last property of selector HOT 2
- `@import ` cannot recursively look up the npm package directory HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from less-loader.