Skip to content
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
kaimsfd committed Oct 9, 2023
1 parent 5997b75 commit eb3f0f7
Show file tree
Hide file tree
Showing 11 changed files with 5 additions and 74 deletions.
2 changes: 0 additions & 2 deletions frontend/config/env.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use strict';

const fs = require('fs');
const path = require('path');
const paths = require('./paths');
Expand Down
2 changes: 0 additions & 2 deletions frontend/config/getHttpsConfig.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use strict';

const fs = require('fs');
const path = require('path');
const crypto = require('crypto');
Expand Down
2 changes: 0 additions & 2 deletions frontend/config/modules.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use strict';

const fs = require('fs');
const path = require('path');
const paths = require('./paths');
Expand Down
54 changes: 0 additions & 54 deletions frontend/config/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use strict';

const fs = require('fs');
const path = require('path');
const webpack = require('webpack');
Expand Down Expand Up @@ -58,11 +56,6 @@ const imageInlineSizeLimit = parseInt(
// Check if TypeScript is setup
const useTypeScript = fs.existsSync(paths.appTsConfig);

// Check if Tailwind config exists
const useTailwind = fs.existsSync(
path.join(paths.appPath, 'tailwind.config.js')
);

// Get the path to the uncompiled service worker (if it exists).
const swSrc = paths.swSrc;

Expand Down Expand Up @@ -120,51 +113,6 @@ module.exports = function (webpackEnv) {
loader: require.resolve('css-loader'),
options: cssOptions,
},
{
// Options for PostCSS as we reference these options twice
// Adds vendor prefixing based on your specified browser support in
// package.json
loader: require.resolve('postcss-loader'),
options: {
postcssOptions: {
// Necessary for external CSS imports to work
// https://github.com/facebook/create-react-app/issues/2677
ident: 'postcss',
config: false,
plugins: !useTailwind
? [
'postcss-flexbugs-fixes',
[
'postcss-preset-env',
{
autoprefixer: {
flexbox: 'no-2009',
},
stage: 3,
},
],
// Adds PostCSS Normalize as the reset css with default options,
// so that it honors browserslist config in package.json
// which in turn let's users customize the target behavior as per their needs.
'postcss-normalize',
]
: [
'tailwindcss',
'postcss-flexbugs-fixes',
[
'postcss-preset-env',
{
autoprefixer: {
flexbox: 'no-2009',
},
stage: 3,
},
],
],
},
sourceMap: isEnvProduction ? shouldUseSourceMap : isEnvDevelopment,
},
},
].filter(Boolean);
if (preProcessor) {
loaders.push(
Expand Down Expand Up @@ -517,7 +465,6 @@ module.exports = function (webpackEnv) {
mode: 'icss',
},
},
'sass-loader'
),
// Don't consider CSS imports dead code even if the
// containing package claims to have no side effects.
Expand All @@ -540,7 +487,6 @@ module.exports = function (webpackEnv) {
getLocalIdent: getCSSModuleLocalIdent,
},
},
'sass-loader'
),
},
// "file" loader makes sure those assets get served by WebpackDevServer.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
'use strict';
const { createHash } = require('crypto');

module.exports = env => {
Expand Down
2 changes: 0 additions & 2 deletions frontend/config/webpackDevServer.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use strict';

const fs = require('fs');
const evalSourceMapMiddleware = require('react-dev-utils/evalSourceMapMiddleware');
const noopServiceWorkerMiddleware = require('react-dev-utils/noopServiceWorkerMiddleware');
Expand Down
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
]
},
"dependencies": {
"@apollo/client": "^3.8.4",
"@apollo/client": "^3.8.5",
"@chakra-ui/react": "^2.8.1",
"@diamondlightsource/ui-components": "^1.0.2",
"@emotion/react": "^11.11.1",
Expand Down
2 changes: 0 additions & 2 deletions frontend/scripts/build.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use strict';

// Do this as the first thing so that any code reading it knows the right env.
process.env.BABEL_ENV = 'production';
process.env.NODE_ENV = 'production';
Expand Down
2 changes: 0 additions & 2 deletions frontend/scripts/start.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use strict';

// Do this as the first thing so that any code reading it knows the right env.
process.env.BABEL_ENV = 'development';
process.env.NODE_ENV = 'development';
Expand Down
2 changes: 0 additions & 2 deletions frontend/scripts/test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use strict';

// Do this as the first thing so that any code reading it knows the right env.
process.env.BABEL_ENV = 'test';
process.env.NODE_ENV = 'test';
Expand Down
8 changes: 4 additions & 4 deletions frontend/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@
jsonpointer "^5.0.0"
leven "^3.1.0"

"@apollo/client@^3.8.4":
version "3.8.4"
resolved "https://registry.yarnpkg.com/@apollo/client/-/client-3.8.4.tgz#b6d67251422ee8bb05e240ffa65fe8fbd336cd66"
integrity sha512-QFXE4ylSHUa6LgYoOGsPysJCm4YJOOM1NwHyF6msZdZXIerqUVpLvxQOdQEXgS0RWvYiBMC1wGOWKzJKSWBdAg==
"@apollo/client@^3.8.5":
version "3.8.5"
resolved "https://registry.yarnpkg.com/@apollo/client/-/client-3.8.5.tgz#becd2101d6049afd03dd796693fb5804346df42f"
integrity sha512-/ueWC3f1pFeH+tWbM1phz6pzUGGijyml6oQ+LKUcQzpXF6tVFPrb6oUIUQCbZpr6Xmv/dtNiFDohc39ra7Solg==
dependencies:
"@graphql-typed-document-node/core" "^3.1.1"
"@wry/context" "^0.7.3"
Expand Down

0 comments on commit eb3f0f7

Please sign in to comment.