chore: migrate to vite from webpack

This commit is contained in:
ayo 2026-04-02 08:53:09 +02:00
parent df10fe082a
commit 671965942a
5 changed files with 647 additions and 2269 deletions

View file

@ -8,7 +8,6 @@
<meta name="Description" content="Play Minesweeper online for FREE!" />
<title>Minesweeper</title>
<script type="module" src="vendors~main.bundle.js"></script>
<link rel="stylesheet" href="main.bundle.css" />
<link rel="shortcut icon" type="image/png" href="assets/favicon.ico" />
</head>
@ -20,10 +19,12 @@
<div class="lds-ellipsis"><div></div><div></div><div></div><div></div></div>
</div>
<!-- Want to update how people show their support
<script type='text/javascript' src='https://ko-fi.com/widgets/widget_2.js'></script><script type='text/javascript'>kofiwidget2.init('Buy me a coffee', '#29abe0', 'ayoayco');kofiwidget2.draw();</script>
-->
</div>
<script type="module" src="main.bundle.js"></script>
<script type="module" src="./src/main.js"></script>
</body>
</html>

View file

@ -3,6 +3,7 @@
"version": "0.3.13",
"description": "Classic Minesweeper browser game",
"author": "Ayo Ayco",
"type": "module",
"repository": {
"type": "git",
"url": "https://github.com/ayoayco/mnswpr"
@ -10,27 +11,17 @@
"main": "src/index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"dev": "concurrently --kill-others \"npm run watch:dev\" \"npm start\"",
"start:dev": "concurrently --kill-others \"npm run watch:dev\" \"npm start\"",
"start": "http-server ./dist/ -a localhost -p 4200",
"watch:dev": "node ./node_modules/webpack/bin/webpack.js --watch --mode development .",
"buildprod": "node ./node_modules/webpack/bin/webpack.js --mode production .",
"dev": "vite",
"start": "vite",
"build": "vite build",
"prepare": "husky"
},
"license": "ISC",
"dependencies": {
"firebase": "^12.9.0"
"firebase": "^12.11.0"
},
"devDependencies": {
"concurrently": "^9.2.1",
"css-loader": "^7.1.4",
"file-loader": "^6.2.0",
"http-server": "^14.1.1",
"husky": "^9.1.7",
"mini-css-extract-plugin": "^2.10.0",
"optimize-css-assets-webpack-plugin": "^6.0.1",
"terser-webpack-plugin": "^5.3.16",
"webpack": "^5.105.2",
"webpack-cli": "^6.0.1"
"vite": "^8.0.3"
}
}

File diff suppressed because it is too large Load diff

View file

@ -1,7 +1,7 @@
import './index.css';
import './modules/loading/loading.css';
import './assets/favicon.ico';
import { Minesweeper } from './minesweeper.js';
import Minesweeper from './minesweeper.js';
const myMinesweeper = new Minesweeper('app');
myMinesweeper.initialize();

View file

@ -887,3 +887,5 @@ export const Minesweeper = function(appId) {
}
}
}
export default Minesweeper