You don't have to remove it just adjust that package. Json to what you want in it. I suggest including axios.
Jul 21, 2020
5
Level 3
Remove jquery and bootstrap package.json
I need to remove jquery, bootstrap and popper from my dependencies, I will only use vuejs.
But when I remove the package.json and run the npm run watch, the following error appears:
ERROR in ./resources/sass/app.scss
Module build failed (from ./node_modules/css-loader/index.js):
ModuleBuildError: Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
SassError: Can't find stylesheet to import.
╷
8 │ @import '~ bootstrap / scss / bootstrap';
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
╵
How do I solve this?
Level 16
Edit your resources\js\bootstrap.js file.
Remove/comment out what you don't need.
try {
//window.$ = window.jQuery = require('jquery');
//require('bootstrap');
} catch (e) {}
Edit your resources\sass\app.scss:
// Bootstrap
// @import '~bootstrap/scss/bootstrap';
No matter what is in your package.json file, it will only compile what you are including (and by default, jquery and bootstrap is included).
1 like
Please or to participate in this conversation.