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

Sign up
Appearance settings

Commit 7264168

Browse files
webpack fix and warning fixes (#187)
* webpack fix and warning fixes * fix * should log fix
1 parent c83f2af commit 7264168

File tree

5 files changed

+13
-24
lines changed

5 files changed

+13
-24
lines changed

‎.circleci/config.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ executors:
1010
docker:
1111
- image: cimg/node:22.7.0
1212
working_directory: ~/frontend
13+
resource_class: large
1314

1415
jobs:
1516
go-mod-install:

‎public/app/core/reducers/fn-slice.ts‎

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,6 @@ export const fnStateProps: FnStateProp[] = [
4141
'version',
4242
];
4343

44-
export const fnPropsMappedFromState: readonly FnPropMappedFromState[] = [
45-
'FNDashboard',
46-
'hiddenVariables',
47-
'mode',
48-
'uid',
49-
'queryParams',
50-
'slug',
51-
'version',
52-
] as const;
53-
5444
const INITIAL_MODE = GrafanaThemeType.Light;
5545

5646
export const FN_STATE_KEY = 'fnGlobalState';

‎public/app/fn-app/fn-dashboard-page/fn-dashboard.tsx‎

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
import { pick } from 'lodash';
21
import { FC, useMemo } from 'react';
32

4-
import { FnPropMappedFromState,fnPropsMappedFromState } from 'app/core/reducers/fn-slice';
5-
import { StoreState,useSelector } from 'app/types';
3+
import { FnGlobalState,FnPropMappedFromState } from 'app/core/reducers/fn-slice';
4+
import { useSelector } from 'app/types';
65

76
import { FnAppProvider } from '../fn-app-provider';
87
import { FNDashboardProps } from '../types';
@@ -20,12 +19,8 @@ export const FNDashboard: FC<FNDashboardComponentProps> = (props) => {
2019
);
2120
};
2221

23-
function mapStateToProps() {
24-
return ({ fnGlobalState }: StoreState) => pick(fnGlobalState, ...fnPropsMappedFromState);
25-
}
26-
2722
export const DashboardPortal: FC<FNDashboardComponentProps> = (p) => {
28-
const globalFnProps = useSelector(mapStateToProps());
23+
const globalFnProps = useSelector<FnGlobalState>(({ fnGlobalState })=>fnGlobalState);
2924

3025
const props = useMemo(
3126
() => ({

‎public/microfrontends/fn_dashboard/index.html‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
</script>
1818

1919

20-
<script nonce="" src="../../../public/build/runtime~fn_dashboard.27b2008e9aab8f8985b3.js" type="text/javascript"></script>
20+
<script nonce="" src="../../../public/build/runtime~fn_dashboard.fc198176f5de1db6b062.js" type="text/javascript"></script>
2121

22-
<script nonce="" src="../../../public/build/fn_dashboard.1f9b5b453196a7012a75.js" type="text/javascript"></script>
22+
<script nonce="" src="../../../public/build/fn_dashboard.e177740ae17aef5ea15a.js" type="text/javascript"></script>
2323

2424
</body>
2525
</html>

‎scripts/webpack/webpack.dev.js‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,9 @@ const esbuildOptions = {
2626
};
2727

2828
const envConfig = getEnvConfig();
29-
3029
module.exports = (env = {}) => {
3130
return merge(common, {
32-
devtool: 'eval-source-map',
31+
devtool: false,
3332
mode: 'development',
3433

3534
entry: {
@@ -76,7 +75,6 @@ module.exports = (env = {}) => {
7675
// removeEmptyChunks: false,
7776
// splitChunks: false,
7877
// },
79-
8078
optimization: {
8179
moduleIds: 'named',
8280
runtimeChunk: true,
@@ -96,6 +94,11 @@ module.exports = (env = {}) => {
9694
},
9795
},
9896

97+
performance: {
98+
hints: false,
99+
},
100+
parallelism: 2,
101+
99102
plugins: [
100103
parseInt(env.noTsCheck, 10)
101104
? new DefinePlugin({}) // bogus plugin to satisfy webpack API
@@ -139,7 +142,7 @@ module.exports = (env = {}) => {
139142
new DefinePlugin({
140143
'process.env': {
141144
NODE_ENV: JSON.stringify('development'),
142-
SHOULD_LOG: JSON.stringify('true'),
145+
SHOULD_LOG: JSON.stringify(process.env.SHOULD_LOG),
143146
},
144147
}),
145148
],

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /