generated from gridsuite/gridapp-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Vite migration #30
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
Merged
Merged
Vite migration #30
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
1bb2cbc
Migration vite
flomillot 8670e93
Clean css and style
flomillot 35d468c
Remove file, add comment
flomillot 3830ba4
Updated dependencies in package-lock.json and package.json files, inc…
flomillot 6d2145a
Added hot module replacement logic to prevent state reset with HMR in…
flomillot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,13 @@ | ||
# Browsers that we support | ||
|
||
[production] | ||
>0.2% and supports es6-class | ||
not dead | ||
not op_mini all | ||
not chrome < 51 | ||
not safari < 10 | ||
|
||
[development] | ||
last 1 chrome version | ||
last 1 firefox version | ||
last 1 safari version |
This file contains hidden or 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 |
---|---|---|
@@ -1,6 +1,5 @@ | ||
EXTEND_ESLINT=true | ||
REACT_APP_DEBUG_REQUESTS=false | ||
REACT_APP_DEBUG_AGGRID=false | ||
VITE_DEBUG_REQUESTS=false | ||
VITE_DEBUG_AGGRID=false | ||
|
||
REACT_APP_API_GATEWAY=/api/gateway | ||
REACT_APP_WS_GATEWAY=/ws/gateway | ||
VITE_API_GATEWAY=/api/gateway | ||
VITE_WS_GATEWAY=/ws/gateway |
This file contains hidden or 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 @@ | ||
{ | ||
"root": true, | ||
"extends": [ | ||
"react-app", | ||
"plugin:prettier/recommended" | ||
], | ||
"ignorePatterns": [ | ||
// node_modules is implicitly always ignored | ||
"build" | ||
], | ||
"rules": { | ||
"prettier/prettier": "warn", | ||
"curly": "error" | ||
} | ||
} |
This file contains hidden or 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
This file contains hidden or 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 |
---|---|---|
|
@@ -7,6 +7,9 @@ | |
# webstorm | ||
/.idea | ||
|
||
# vscode | ||
/.vscode | ||
|
||
# misc | ||
.env.local | ||
.env.development.local | ||
|
This file contains hidden or 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
This file contains hidden or 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,8 @@ | ||
{ | ||
"presets": [ | ||
"@babel/preset-env", | ||
["@babel/preset-react", { "runtime": "automatic" }], | ||
"@babel/preset-typescript", | ||
"babel-preset-vite" | ||
] | ||
} |
This file contains hidden or 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
This file contains hidden or 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,22 @@ | ||
/** | ||
* Copyright (c) 2024, RTE (http://www.rte-france.com) | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
*/ | ||
|
||
import type { Config } from 'jest'; | ||
|
||
const config: Config = { | ||
testEnvironment: 'jsdom', | ||
moduleNameMapper: { | ||
'^.+\\.svg\\?react$': 'jest-svg-transformer', | ||
'^.+\\.(css|less|scss)$': 'identity-obj-proxy', | ||
}, | ||
// if need to test with AG Grid, see https://www.ag-grid.com/react-data-grid/testing/ | ||
transformIgnorePatterns: ['node_modules/(?!@gridsuite/commons-ui)'], // transform from ESM | ||
moduleDirectories: ['node_modules', 'src'], // to allow absolute path from ./src | ||
setupFiles: ['<rootDir>/jest.setup.ts'], | ||
}; | ||
|
||
export default config; |
This file contains hidden or 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,11 @@ | ||
/** | ||
* Copyright (c) 2024, RTE (http://www.rte-france.com) | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
*/ | ||
|
||
import { TextEncoder, TextDecoder } from 'util'; | ||
|
||
// fix for ReferenceError: TextDecoder / TextEncoder is not defined | ||
Object.assign(global, { TextDecoder, TextEncoder }); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.