forked from kyma-project/busola
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: change CRA to Vite (kyma-project#3334)
* feat: npm install vite * feat: npm uninstall react-scripts * feat: adjust package json * feat: add vite config file * feat: move index.html on root * feat: js support * feat: server port * change js to ts * feat: adjust vite config, tsconfig, themeAtom, comment scss import, fix EditCluster, add plugin for paths and svgs * fix: scsses * fix: imports in workers * fix: vite:worker-import-meta-url vite: Rollup failed to resolve import * fix: fetch example rule-set * fix: jsonpath import * fix: trying to fix docker build * feat: add website icon * chore: I hope it's necesary * chore: I hope this will fix build * chore: I hope this will speed up the build * fix: data-testID to data-testid * chore: revert speeding up build * config jest tests * fix settings test and change backend address * change backend address to local * test local address exception * fix: move css declaration * fix: add include for deps optimization * fix: fix monaco errors * fix: fix resource validation & move config * fix: public to base_url, remove unused & monaco fix * fix: adjust theme url for vite * fix: test new yaml copy * chore: remove unused alias * chore: bump cypress * fix: fix docker variable * fix: add not * fix: change var name --------- Co-authored-by: Oliwia Gowor <oliwiagowor@gmail.com>
- Loading branch information
1 parent
cc13afb
commit 2f58885
Showing
57 changed files
with
5,834 additions
and
1,448 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
] | ||
] | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"name": "config-overrides", | ||
"main": "index.js", | ||
"type": "commonjs" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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', | ||
}, | ||
}; |
Oops, something went wrong.