Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: change CRA to Vite #3334

Merged
merged 41 commits into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
5d2bcee
feat: npm install vite
mrCherry97 Sep 8, 2024
406206f
feat: npm uninstall react-scripts
mrCherry97 Sep 8, 2024
5795349
feat: adjust package json
mrCherry97 Sep 8, 2024
db0a2a6
feat: add vite config file
mrCherry97 Sep 8, 2024
4ff17b1
feat: move index.html on root
mrCherry97 Sep 8, 2024
843e190
feat: js support
mrCherry97 Sep 8, 2024
49a7648
feat: server port
mrCherry97 Sep 8, 2024
07da853
change js to ts
mrCherry97 Sep 8, 2024
489b5e6
feat: adjust vite config, tsconfig, themeAtom, comment scss import, f…
mrCherry97 Sep 9, 2024
d60ef00
fix: scsses
mrCherry97 Sep 10, 2024
1c32018
fix: imports in workers
mrCherry97 Sep 10, 2024
fed192c
fix: vite:worker-import-meta-url vite: Rollup failed to resolve import
mrCherry97 Sep 10, 2024
4ca95f7
fix: fetch example rule-set
mrCherry97 Sep 10, 2024
ce01199
fix: jsonpath import
mrCherry97 Sep 10, 2024
12bb098
fix: trying to fix docker build
mrCherry97 Sep 10, 2024
01ffef0
feat: add website icon
mrCherry97 Sep 11, 2024
7335dc0
chore: I hope it's necesary
mrCherry97 Sep 11, 2024
6bd74a1
chore: I hope this will fix build
mrCherry97 Sep 11, 2024
e4ad52f
chore: I hope this will speed up the build
mrCherry97 Sep 11, 2024
55ef19c
fix: data-testID to data-testid
mrCherry97 Sep 11, 2024
1ffbea4
chore: revert speeding up build
mrCherry97 Sep 11, 2024
b670d3b
Merge branch 'main' of github.com:kyma-project/busola into vite-2
mrCherry97 Sep 17, 2024
138d4ca
config jest tests
OliwiaGowor Sep 17, 2024
dbd0aea
fix settings test and change backend address
OliwiaGowor Sep 18, 2024
35d9e53
change backend address to local
OliwiaGowor Sep 18, 2024
2430e91
test local address exception
OliwiaGowor Sep 18, 2024
b254355
fix: move css declaration
OliwiaGowor Sep 23, 2024
78ac6f8
fix: add include for deps optimization
OliwiaGowor Sep 23, 2024
9acf749
Merge branch 'main' into vite-2
OliwiaGowor Sep 23, 2024
881e48b
fix: fix monaco errors
OliwiaGowor Sep 24, 2024
47bef30
fix: fix resource validation & move config
OliwiaGowor Sep 25, 2024
5a01b5d
fix: public to base_url, remove unused & monaco fix
OliwiaGowor Sep 27, 2024
6f42305
fix: adjust theme url for vite
OliwiaGowor Sep 27, 2024
f069d97
fix: test new yaml copy
OliwiaGowor Sep 27, 2024
3b71972
chore: remove unused alias
OliwiaGowor Sep 27, 2024
9701a94
Merge branch 'main' into vite-2
OliwiaGowor Sep 30, 2024
7f062b5
chore: bump cypress
OliwiaGowor Sep 30, 2024
3893848
fix: fix docker variable
OliwiaGowor Oct 1, 2024
696e794
fix: add not
OliwiaGowor Oct 1, 2024
48cfcde
fix: change var name
OliwiaGowor Oct 2, 2024
5d84317
Merge branch 'main' into vite-2
OliwiaGowor Oct 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions babel.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"presets": [
["@babel/preset-env", { "targets": { "node": "current" } }],

"@babel/preset-react",

[
"babel-preset-vite",
{
"env": true,
"glob": false
}
]
]
}
52 changes: 0 additions & 52 deletions config-overrides.js

This file was deleted.

18 changes: 18 additions & 0 deletions config-overrides/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// this overrides configs of webpack and jest. See react-app-rewired documentation for details

module.exports = {
jest: function(config) {
config.moduleNameMapper = {
'^shared/?(.*)': '<rootDir>/src/shared/$1',
...config.moduleNameMapper,
};
config.transformIgnorePatterns = [
'node_modules/(?!(@ui5|lit-html|d3|internmap)).*\\.js$',
];
config.snapshotSerializers = [
'enzyme-to-json/serializer',
...(config.snapshotSerializers || []),
];
return config;
},
};
5 changes: 5 additions & 0 deletions config-overrides/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name": "config-overrides",
"main": "index.js",
"type": "commonjs"
}
43 changes: 43 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link
rel="icon"
type="image/png"
sizes="32x32"
href="./assets/favicon-32x32.png"
/>
<link
rel="icon"
type="image/png"
sizes="16x16"
href="./assets/favicon-16x16.png"
/>
<meta
name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no"
/>
<meta name="theme-color" content="#000000" />
<title>Busola</title>
</head>

<body class="ui5-content-native-scrollbars ui5-content-density-compact">
<noscript>
You need to enable JavaScript to run this app.
</noscript>
<script type="module" src="/src/index.tsx"></script>

<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.

You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.

To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</html>
9 changes: 9 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export default {
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1',
},
testEnvironment: 'jest-environment-jsdom',
transform: {
'^.+\\.[t|j]sx?$': 'babel-jest',
},
};
Loading
Loading