Switched from snowpack to vite
This commit is contained in:
parent
c3ae023ff7
commit
60724dfa60
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,3 +1,4 @@
|
||||
node_modules/
|
||||
package-lock.json
|
||||
build/
|
||||
pnpm-lock.yaml
|
||||
dist/
|
13
index.html
Normal file
13
index.html
Normal file
@ -0,0 +1,13 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>React application</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
<script type="module" src="./src/index.tsx"></script>
|
||||
</body>
|
||||
</html>
|
21
package.json
21
package.json
@ -1,20 +1,21 @@
|
||||
{
|
||||
"scripts": {
|
||||
"dev": "snowpack dev",
|
||||
"build": "snowpack build",
|
||||
"dev": "vite",
|
||||
"build": "vite build",
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@snowpack/plugin-typescript": "^1.2.1",
|
||||
"@types/node": "^15.0.1",
|
||||
"@types/react": "^17.0.4",
|
||||
"@types/react-dom": "^17.0.3",
|
||||
"@types/snowpack-env": "^2.3.3",
|
||||
"snowpack": "^3.3.5",
|
||||
"typescript": "^4.2.4"
|
||||
"serve": "^12.0.0",
|
||||
"typescript": "^4.4.2",
|
||||
"vite": "^2.5.3",
|
||||
"@emotion/react": "^11.4.1",
|
||||
"@emotion/styled": "^11.3.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@mui/icons-material": "^5.0.3",
|
||||
"@mui/material": "^5.0.3",
|
||||
"react": "^17.0.2",
|
||||
"react-dom": "^17.0.2"
|
||||
}
|
||||
},
|
||||
"private": "true"
|
||||
}
|
||||
|
@ -1,15 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>React application</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
<script type="module" src="/dist/index.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
@ -1,25 +0,0 @@
|
||||
// Snowpack Configuration File
|
||||
// See all supported options: https://www.snowpack.dev/reference/configuration
|
||||
|
||||
/** @type {import("snowpack").SnowpackUserConfig } */
|
||||
module.exports = {
|
||||
plugins: ["@snowpack/plugin-typescript"],
|
||||
packageOptions: {
|
||||
polyfillNode: true,
|
||||
},
|
||||
mount: {
|
||||
public: "/",
|
||||
src: "/dist",
|
||||
},
|
||||
optimize: {
|
||||
bundle: true,
|
||||
},
|
||||
routes: [
|
||||
{ match: "routes", src: "robots.txt", dest: "/robots.txt" },
|
||||
{ match: "routes", src: ".*", dest: "/index.html" },
|
||||
],
|
||||
devOptions: {
|
||||
open: "none",
|
||||
},
|
||||
exclude: ["**/node_modules/**/*", "**/*.test.*"],
|
||||
};
|
@ -1,13 +1,13 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "es5",
|
||||
"target": "ESNext",
|
||||
"strict": true,
|
||||
"esModuleInterop": true,
|
||||
"skipLibCheck": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"jsx": "react-jsx",
|
||||
"lib": ["DOM"],
|
||||
"module": "ES2020",
|
||||
"lib": ["es6", "DOM", "dom.iterable"],
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "node"
|
||||
}
|
||||
}
|
||||
|
3
vite.config.js
Normal file
3
vite.config.js
Normal file
@ -0,0 +1,3 @@
|
||||
import { defineConfig } from "vite";
|
||||
|
||||
export default defineConfig({});
|
Loading…
x
Reference in New Issue
Block a user