Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added vitejs as a launcher for index.html. package.json #1126

Merged
merged 5 commits into from
Feb 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# NPM and Yarn
# NPM / Yarn / Pnpm
npm-debug.log
yarn-error.log
pnpm-lock.yaml
node_modules/

# Build artifacts and asset stuff
Expand Down Expand Up @@ -50,4 +51,4 @@ DerivedData
VendorLib/clang/lib/arc
VendorLib/clang/lib/c++

.idea
.idea
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
"author": "Peter Cottle <[email protected]>",
"license": "MIT",
"scripts": {
"dev": "vite",
"prepare": "gulp fastBuild",
"test": "gulp test"
},
"repository": {
Expand Down Expand Up @@ -33,7 +35,8 @@
"jshint": "^2.13.4",
"prompt": "^1.2.2",
"vinyl-buffer": "^1.0.1",
"vinyl-source-stream": "^2.0.0"
"vinyl-source-stream": "^2.0.0",
"vite": "^4.0.12"
},
"dependencies": {
"backbone": "^1.4.0",
Expand Down
3 changes: 1 addition & 2 deletions src/template.index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
Expand Down
16 changes: 16 additions & 0 deletions vite.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { defineConfig } from 'vite';

export default defineConfig(({ command, mode, isSsrBuild, isPreview }) => {
if (command === 'serve') {
return {
// dev specific config
}
} else {
// command === 'build'
return {
// build specific config
}
}
})


Loading