Vue3 project.
Install Visual Studio Code, Node.js, Git, [TortoiseGit]
Create a new repository in GitHub
No template
my-id/my-repo-name
Vue3 project.
◉ Public
☉ Private
☑ Add a README file
☑ Add .gitignore
.gitignore template: Node ▾
☑ Choose a license
License: GNU General Public License v3.0 ▾
# PowerShell / Git Bash
git clone https://github.com/my-id/my-repo-name.git
Install yarn
# PowerShell
npm install --global yarn
# PowerShell
yarn create @vitejs/app <project-name> --template vue-ts
Install Volar, [Code Spell Checker], [git-commit-plugin]
# PowerShell
yarn install
# PowerShell
yarn run build
[Vue SFC]
Vue Single-File Components (aka *.vue files, abbreviated as SFC) is a special file format that allows us to encapsulate the template, logic, and styling of a Vue component in a single file.
# PowerShell
yarn add --dev vite-plugin-singlefile
// vite.config.ts
import { viteSingleFile } from "vite-plugin-singlefile"
export default defineConfig({
plugins: [vue(), viteSingleFile()],
build: {
target: "esnext",
outDir: 'dist',
assetsInlineLimit: 100000000,
chunkSizeWarningLimit: 100000000,
cssCodeSplit: false,
brotliSize: false,
rollupOptions: {
inlineDynamicImports: true,
output: {
manualChunks: () => "everything.js",
},
},
},
})
// vite.config.ts
export default defineConfig({
build: {
target: "esnext",
outDir: 'dist',
assetsInlineLimit: 100000000,
chunkSizeWarningLimit: 100000000,
cssCodeSplit: false,
brotliSize: false,
rollupOptions: {
inlineDynamicImports: true,
output: {
manualChunks: () => 'everything.js',
entryFileNames: 'assets/[name].js',
chunkFileNames: 'assets/[name].js',
assetFileNames: 'assets/[name].[ext]'
}
}
}
})
# PowerShell
vite
// vite.config.ts
export default defineConfig({
server: {
host: '0.0.0.0'
},
build: {
target: "esnext",
outDir: 'dist',
assetsInlineLimit: 100000000,
chunkSizeWarningLimit: 100000000,
cssCodeSplit: false,
brotliSize: false,
rollupOptions: {
inlineDynamicImports: true,
output: {
manualChunks: () => 'everything.js',
entryFileNames: 'assets/[name].js',
chunkFileNames: 'assets/[name].js',
assetFileNames: 'assets/[name].[ext]'
}
}
}
})