Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
March 18, 2022 07:42 am GMT

Vue3 Vite Boostrap 5 Sass Setup

1: Installing Vue3 using Vite

> npm init vue@latest
  • This command will install and execute create-vue, the official Vue project scaffolding tool.
  • You will be presented with prompts for a number of optional features such as TypeScript and testing support:

Image description

Image description

2: File cleanup & Display simple Hello World!

> rm -r src/assets/> rm -r src/components/
<!-- src/App.vue --><template>  <h1>Hello World!</h1></template>

3: Install Boostrap 5 & Setup

> npm install bootstrap
// src/main.jsimport { createApp } from "vue";import App from "./App.vue";import "bootstrap/dist/css/bootstrap.css";createApp(App).mount("#app");import "bootstrap/dist/js/bootstrap.js";

4: Sass Setup

  • Vite does provide built-in support for .scss, .sass, .less, .styl and .stylus files. There is no need to install Vite-specific plugins for them, but the corresponding pre-processor itself must be installed:
> npm install -D sass
<!-- src/App.vue --><template>  <h1>Hello World!</h1></template><style lang="scss">h1 {  color: green;  &:hover {    color: greenyellow;  }}</style>

Done!!!


Original Link: https://dev.to/alex1the1great/vue3-vite-boostrap-5-sass-setup-2fcn

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To