Sunday, May 28, 2023
  • About
  • Advertise
  • Careers
  • Contact
ioi.to Happiness Community
  • หน้าแรก
  • News
  • Health Gadget
  • New Gadget
  • Industrial Supplies
  • Opinion
  • Lifestyle
  • Login
No Result
View All Result
ioi.to Happiness Community
Home สัพเพเหระ

Basic Vue.js 3 – Setup Project and Tool

Step 1 : ติดตั้ง Vue CLI

ตรวจสอบ Vue CLI ของเดิมก่อน

vue --version

ถ้าต้องการติดตั้งใหม่ ก็ถอนของเดิมออกก่อน

npm uninstall -g @vue/cli

ติดตั้ง Vue CLI

npm install -g @vue/cli

Step 2 : ติดตั้ง chrome extensions

  • Vue.js devtools

Step 3 : สร้างโปรเจ็กต์ Vue.js ด้วย Vue ClI

รัน คำสั่งใน  folder ที่ต้องการเอาโปรเจ็กไปไปวาง

vue create [project_name]

ตัวอย่าง
vue create vue3basic

config project

? Please pick a preset
> Manually select features


? Please pick a preset: Manually select features
 (*) Babel
 (*) Router
  (*) Vuex
 (*) CSS Pre-processors
 (*) Linter / Formatter
? Please pick a preset: Manually select features
> 3.x

Use history mode for router? (Requires proper server setup for index fallback in production) (Y/n)
Y

? Pick a CSS pre-processor (PostCSS, Autoprefixer and CSS Modules are supported by default): (Use arrow keys)
> Sass/SCSS (with dart-sass)

? Pick a linter / formatter config ?
> ESLint with error prevention only

? Pick additional lint features ?
>(*) Lint on save

? Where do you prefer placing config for Babel, ESLint, etc.?
> In dedicated config files

? Save this as a preset for future projects? (y/N)
N

สั่งรับ project ดัวยคำสั่ง ** สั่งใน path ของ project  นะครับ

npm run serve

 

สั่ง build project หลังจากรันจะได้ folder dist เพิ่มมา

npm run build

ลง serve เพื่อทดสอบรัน projact ที่ build แล้ว

npm install -g serve

สั่งรับ project

serve -s dist

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

15 − 8 =

ioi.to Community Happiness

ioi คอมมูนิตี้แหล่งความสุข

คอมมูนิตี้แหล่งความสุข ชุมชนแห่งการแบ่งปัน
เพราะเรื่องราว ดีๆ มีไว้ส่งต่อความสุข

Follow us on social media:

Recent News

  • Advanced Vue JS 3 Online : Day 1
  • Vue.js 3 + Vite – Setup Project and Tool
  • Basic Vue.js 3 – Setup Project and Tool

Category

  • Health Gadget
  • Industrial Supplies
  • Lifestyle
  • National
  • New Gadget
  • News
  • Opinion
  • PHP
  • search engine optimization
  • Seo Tips
  • Sports
  • Travel
  • สัพเพเหระ

หัวข้อ อัพเดทล่าสุด

Advanced Vue JS 3 Online : Day 1

May 21, 2023

Vue.js 3 + Vite – Setup Project and Tool

May 20, 2023
  • About
  • Advertise
  • Careers
  • Contact

© 2019 ioi.to Happiness Community

No Result
View All Result
  • Home
  • Health Gadget
  • News
  • New Gadget
  • Industrial Supplies
  • National
  • Sports
  • Lifestyle
  • Travel
  • Opinion

© 2019 ioi.to Happiness Community

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In