Skip to content

Commit 247f71d

Browse files
chore: migrate from webpack to vite
1 parent df63b34 commit 247f71d

29 files changed

+609
-3727
lines changed

.babelrc

Lines changed: 0 additions & 4 deletions
This file was deleted.

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@
1111
</head>
1212
<body>
1313
<div id="root"></div>
14-
<script src="bundle.js"></script>
14+
<script type="module" src="/src/index.jsx"></script>
1515
</body>
1616
</html>

package.json

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
22
"name": "@uirouter/sample-app-react",
33
"version": "1.0.0",
44
"description": "Architecture overview demo for UI-Router React",
5+
"type": "module",
56
"scripts": {
67
"clean": "rimraf docs",
7-
"start": "NODE_ENV=development webpack serve --config webpack.config.js",
8-
"build": "npm run clean && mkdirp docs && cp index.html docs/index.html && NODE_ENV=production webpack",
8+
"start": "vite",
9+
"build": "vite build",
10+
"preview": "vite preview",
911
"test": "npm run build && playwright test",
1012
"test:ui": "npm run build && playwright test --ui",
1113
"test:report": "playwright show-report",
@@ -16,31 +18,18 @@
1618
"dependencies": {
1719
"@uirouter/react": "^1.0.7",
1820
"@uirouter/visualizer": "^7.2.1",
19-
"browserslist": "4.28.1",
2021
"lodash": "^4.17.21",
21-
"picomatch": "4.0.3",
2222
"react": "^16.14.0",
2323
"react-dom": "^16.14.0",
2424
"whatwg-fetch": "^3.6.2"
2525
},
2626
"devDependencies": {
27-
"@babel/core": "^7.14.8",
28-
"@babel/preset-env": "^7.14.9",
29-
"@babel/preset-react": "^7.14.5",
3027
"@playwright/test": "^1.48.0",
28+
"@vitejs/plugin-react": "^4.3.1",
3129
"autoprefixer": "^10.4.23",
32-
"babel-loader": "^10.0.0",
33-
"babel-plugin-transform-class-properties": "^6.24.1",
34-
"copy-webpack-plugin": "^13.0.1",
35-
"css-loader": "^7.1.2",
36-
"mkdirp": "^3.0.1",
37-
"postcss-load-config": "^6.0.1",
38-
"postcss-loader": "^8.2.0",
30+
"postcss": "^8.4.47",
3931
"rimraf": "^6.1.2",
4032
"serve": "^14.2.0",
41-
"style-loader": "^4.0.0",
42-
"webpack": "^5.104.1",
43-
"webpack-cli": "^6.0.1",
44-
"webpack-dev-server": "^5.2.2"
33+
"vite": "^6.0.6"
4534
}
4635
}

postcss.config.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
module.exports = {
1+
export default {
22
plugins: {
3-
'autoprefixer': {},
4-
}
5-
}
3+
autoprefixer: {},
4+
},
5+
};

0 commit comments

Comments
 (0)