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 npm-debug.log
yarn-error.log yarn-error.log
pnpm-lock.yaml
node_modules/ node_modules/
# Build artifacts and asset stuff # Build artifacts and asset stuff
@ -50,4 +51,4 @@ DerivedData
VendorLib/clang/lib/arc VendorLib/clang/lib/arc
VendorLib/clang/lib/c++ VendorLib/clang/lib/c++
.idea .idea

View file

@ -6,6 +6,8 @@
"author": "Peter Cottle <petermcottle@gmail.com>", "author": "Peter Cottle <petermcottle@gmail.com>",
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {
"dev": "vite",
"prepare": "gulp fastBuild",
"test": "gulp test" "test": "gulp test"
}, },
"repository": { "repository": {
@ -33,7 +35,8 @@
"jshint": "^2.13.4", "jshint": "^2.13.4",
"prompt": "^1.2.2", "prompt": "^1.2.2",
"vinyl-buffer": "^1.0.1", "vinyl-buffer": "^1.0.1",
"vinyl-source-stream": "^2.0.0" "vinyl-source-stream": "^2.0.0",
"vite": "^4.0.12"
}, },
"dependencies": { "dependencies": {
"backbone": "^1.4.0", "backbone": "^1.4.0",

View file

@ -1,5 +1,4 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" <!DOCTYPE html>
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8"> <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
}
}
})