Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3d443ca

Browse filesBrowse files
Update fixtures/flight to webpack 5 (#25115)
* Add new flight fixture * Move flight dir files * Enable writeToDisk and distDir * Move flight2 -> flight * flight2 -> flight * Remove unused files * Remove unused files * Run prettier * Ignore eslint cache Co-authored-by: Sebastian Markbage <sebastian@calyptus.eu>
1 parent 5d1ce65 commit 3d443ca
Copy full SHA for 3d443ca

13 files changed

+5,774-7,946Lines changed: 5774 additions & 7946 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎fixtures/flight/.env‎

Copy file name to clipboardExpand all lines: fixtures/flight/.env
-1Lines changed: 0 additions & 1 deletion
This file was deleted.
Collapse file

‎fixtures/flight/config/env.js‎

Copy file name to clipboardExpand all lines: fixtures/flight/config/env.js
-2Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,6 @@ function getClientEnvironment(publicUrl) {
8686
WDS_SOCKET_PATH: process.env.WDS_SOCKET_PATH,
8787
WDS_SOCKET_PORT: process.env.WDS_SOCKET_PORT,
8888
// Whether or not react-refresh is enabled.
89-
// react-refresh is not 100% stable at this time,
90-
// which is why it's disabled by default.
9189
// It is defined here so it is available in the webpackHotDevClient.
9290
FAST_REFRESH: process.env.FAST_REFRESH !== 'false',
9391
}
Collapse file
+29Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
'use strict';
2+
3+
const babelJest = require('babel-jest').default;
4+
5+
const hasJsxRuntime = (() => {
6+
if (process.env.DISABLE_NEW_JSX_TRANSFORM === 'true') {
7+
return false;
8+
}
9+
10+
try {
11+
require.resolve('react/jsx-runtime');
12+
return true;
13+
} catch (e) {
14+
return false;
15+
}
16+
})();
17+
18+
module.exports = babelJest.createTransformer({
19+
presets: [
20+
[
21+
require.resolve('babel-preset-react-app'),
22+
{
23+
runtime: hasJsxRuntime ? 'automatic' : 'classic',
24+
},
25+
],
26+
],
27+
babelrc: false,
28+
configFile: false,
29+
});
Collapse file

‎fixtures/flight/config/paths.js‎

Copy file name to clipboardExpand all lines: fixtures/flight/config/paths.js
+5-1Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ const publicUrlOrPath = getPublicUrlOrPath(
2121
process.env.PUBLIC_URL
2222
);
2323

24+
const buildPath = process.env.BUILD_PATH || 'build';
25+
2426
const moduleFileExtensions = [
2527
'web.mjs',
2628
'mjs',
@@ -52,7 +54,7 @@ const resolveModule = (resolveFn, filePath) => {
5254
module.exports = {
5355
dotenv: resolveApp('.env'),
5456
appPath: resolveApp('.'),
55-
appBuild: resolveApp('build'),
57+
appBuild: resolveApp(buildPath),
5658
appPublic: resolveApp('public'),
5759
appHtml: resolveApp('public/index.html'),
5860
appIndexJs: resolveModule(resolveApp, 'src/index'),
@@ -64,6 +66,8 @@ module.exports = {
6466
testsSetup: resolveModule(resolveApp, 'src/setupTests'),
6567
proxySetup: resolveApp('src/setupProxy.js'),
6668
appNodeModules: resolveApp('node_modules'),
69+
appWebpackCache: resolveApp('node_modules/.cache'),
70+
appTsBuildInfoFile: resolveApp('node_modules/.cache/tsconfig.tsbuildinfo'),
6771
swSrc: resolveModule(resolveApp, 'src/service-worker'),
6872
publicUrlOrPath,
6973
};
Collapse file

‎fixtures/flight/config/pnpTs.js‎

Copy file name to clipboardExpand all lines: fixtures/flight/config/pnpTs.js
-35Lines changed: 0 additions & 35 deletions
This file was deleted.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.