Jamie-Yang/vue3-boilerplate
Tentang
A Vue 3 starter with Vue Router 5, Pinia 4, TypeScript 6, Webpack 5 and More.
Pengembangan web dan aplikasiPertumbuhan bintang terukur
- dalam 24 jam
- 0
- dalam 7 hari
- 0
- dalam 15 hari
- 0
- dalam 1 bulan
- Mengumpulkan riwayat
Perubahan bersih pada periode yang tumpang tindih, bukan total harian. Pengukuran yang belum tersedia dibiarkan kosong. Bintang menunjukkan perhatian, bukan kualitas.
README.md
Aslivue3-boilerplate
A Vue 3 starter with Vue Router 5, Pinia 4, TypeScript 6 and Webpack 5.
Requirements
- Node.js
^22.18.0 || >=24.11.0 - pnpm 10
Getting started
pnpm install --frozen-lockfile
pnpm dev
The development server listens on port 8080 by default.
Commands
| Command | Description |
|---|---|
pnpm dev |
Start the development server. |
pnpm build |
Type-check and build to dist/, removing stale output files on emit. |
pnpm type-check |
Check TypeScript and Vue files without generating a bundle. |
pnpm lint |
Run Prettier, ESLint and Stylelint with formatting and automatic fixes. |
Project structure
├─ public # Static files copied to the output directory.
├─ service
│ ├─ commands # Development and build entry points.
│ ├─ config # Webpack configuration.
│ └─ project.config.js # Port, public paths and output directory.
├─ src
│ ├─ assets # Shared images, fonts and styles.
│ ├─ components # Shared Vue components.
│ ├─ router # Routes; uses hash history.
│ ├─ stores # Pinia stores.
│ └─ views # Pages and their local components and assets.
The @/ import alias points to src/.
Configuration
- Set the development port, development/production public paths and output directory in
service/project.config.js. - Configure target browsers in
.browserslistrc. - Static files belong in
public/;public/index.htmlis the HTML template.
Environment variables
.envcontains shared values..env.developmentand.env.productioncontain values for their respective commands..env.localand.env.<mode>.localcontain local overrides and are ignored by Git.- Existing environment variables take precedence, except for the command-controlled
NODE_ENVandBABEL_ENVvalues described below. File values take precedence in this order:.env.<mode>.local,.env.<mode>,.env.local,.env.
Variables prefixed with VUE_APP_ are embedded in client code and can be read through process.env.VUE_APP_*. Do not put secrets in these variables. NODE_ENV and PUBLIC_PATH are also available in client code.
const apiBaseUrl = process.env.VUE_APP_API_BASE_URL
pnpm dev sets NODE_ENV and BABEL_ENV to development; pnpm build sets them to production.
Restart the development server after changing environment files or build configuration.
Jelajahi proyek terkait
Memuat…