Comments (4)
https://stevenwestmoreland.com/2018/01/how-to-include-bootstrap-in-your-project-with-webpack.html
from webpack4-bootstrap4-demo.
1.安装依赖 npm install bootstrap jquery popper.js --save
https://github.com/yanxiaojun617/webpack4-bootstrap4-demo/blob/master/package.json
2.配置webpack rules —— scss
npm install autoprefixer css-loader node-sass postcss-loader sass-loader style-loader --save-dev
https://github.com/yanxiaojun617/webpack4-bootstrap4-demo/blob/master/webpack.base.conf.js
3.导入Bootstrap
https://github.com/yanxiaojun617/webpack4-bootstrap4-demo/blob/master/src/assets/Common.js
from webpack4-bootstrap4-demo.
PS C:\txh\html\webpack4-bootstrap4-demo-master> npm run dev
[email protected] dev C:\txh\html\webpack4-bootstrap4-demo-master
cross-env NODE_ENV=dev webpack-dev-server --config webpack.config.js --progress
module.js:550
throw err;
^
Error: Cannot find module 'locate-path'
at Function.Module._resolveFilename (module.js:548:15)
at Function.Module._load (module.js:475:25)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at Object. (C:\txh\html\webpack4-bootstrap4-demo-master\node_modules_find-up@3.0.0@find-up\index.js:3:20)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] dev: cross-env NODE_ENV=dev webpack-dev-server --config webpack.config.js --progress
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\HUIPC\AppData\Roaming\npm-cache_logs\2019-03-07T19_28_08_081Z-debug.log
from webpack4-bootstrap4-demo.
@bzzx npm i再试试
from webpack4-bootstrap4-demo.
Related Issues (6)
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 webpack4-bootstrap4-demo.