-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1632 from danskernesdigitalebibliotek/react-19-up…
…date React 19 update
- Loading branch information
Showing
108 changed files
with
2,395 additions
and
3,545 deletions.
There are no files selected for viewing
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
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
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
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 |
---|---|---|
@@ -1,28 +1,45 @@ | ||
// Cypress no longer natively supports plugins file, but we keep it for better code abstraction | ||
// https://docs.cypress.io/app/references/migration-guide#Plugins-File-Removed | ||
import task from "@cypress/code-coverage/task"; | ||
import webpackPreprocessor from "@cypress/webpack-preprocessor"; | ||
|
||
const task = require("@cypress/code-coverage/task"); | ||
const browserify = require("@cypress/browserify-preprocessor"); | ||
|
||
// In order to use both babelrc and typescript in browserify | ||
// we copy the functionality from @cypress/code-coverage/use-babelrc | ||
// and merge it with the typescript setting. | ||
// The plugin @cypress/code-coverage/use-babelrc basically | ||
// sets babelrc: true in the browserify options. | ||
const { browserifyOptions } = browserify.defaultOptions; | ||
browserifyOptions.transform[1][1].babelrc = true; | ||
|
||
module.exports = (on, config) => { | ||
export default (on, config) => { | ||
task(on, config); | ||
on( | ||
"file:preprocessor", | ||
browserify({ | ||
typescript: require.resolve("typescript"), | ||
browserifyOptions: { | ||
extensions: [".js", ".ts"], | ||
...browserifyOptions | ||
|
||
const options = { | ||
webpackOptions: { | ||
resolve: { | ||
extensions: [".ts", ".tsx", ".js", ".jsx"], | ||
modules: ["node_modules", "src"] | ||
}, | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.tsx?$/, | ||
use: [ | ||
{ | ||
loader: "ts-loader", | ||
options: { | ||
transpileOnly: true, | ||
compilerOptions: { | ||
module: "esnext", | ||
target: "es5", | ||
lib: ["es5", "dom"], | ||
jsx: "react", | ||
allowJs: true, | ||
esModuleInterop: true, | ||
allowSyntheticDefaultImports: true, | ||
noEmit: false | ||
} | ||
} | ||
} | ||
], | ||
exclude: /node_modules/ | ||
} | ||
] | ||
} | ||
}) | ||
); | ||
} | ||
}; | ||
|
||
on("file:preprocessor", webpackPreprocessor(options)); | ||
|
||
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 |
---|---|---|
@@ -1,15 +1,9 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "es5", | ||
"lib": [ | ||
"es5", | ||
"dom" | ||
], | ||
"types": [ | ||
"cypress" | ||
] | ||
"lib": ["es5", "dom"], | ||
"types": ["cypress"], | ||
"allowJs": true | ||
}, | ||
"include": [ | ||
"**/*.ts" | ||
] | ||
"include": ["**/*.ts"] | ||
} |
Oops, something went wrong.