Merge pull request #1126 from Angra974/vite-as-index_html-loader

Added vitejs as a launcher for index.html. package.json
This commit is contained in:
Peter Cottle 2024-02-07 09:14:27 -05:00 committed by GitHub
commit de070be14e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 24 additions and 5 deletions

5
.gitignore vendored
View file

@ -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
@ -50,4 +51,4 @@ DerivedData
VendorLib/clang/lib/arc
VendorLib/clang/lib/c++
.idea
.idea

View file

@ -6,6 +6,8 @@
"author": "Peter Cottle <petermcottle@gmail.com>",
"license": "MIT",
"scripts": {
"dev": "vite",
"prepare": "gulp fastBuild",
"test": "gulp test"
},
"repository": {
@ -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",

View file

@ -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">

16
vite.config.js Normal file
View file

@ -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
}
}
})