diff --git a/.circleci/config.yml b/.circleci/config.yml index f34e01ee2f49..768bf87777f3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -10,6 +10,7 @@ executors: docker: - image: cimg/node:22.7.0 working_directory: ~/frontend + resource_class: large jobs: go-mod-install: diff --git a/public/app/core/reducers/fn-slice.ts b/public/app/core/reducers/fn-slice.ts index 0965ba40ebde..d71ce9aef766 100644 --- a/public/app/core/reducers/fn-slice.ts +++ b/public/app/core/reducers/fn-slice.ts @@ -41,16 +41,6 @@ export const fnStateProps: FnStateProp[] = [ 'version', ]; -export const fnPropsMappedFromState: readonly FnPropMappedFromState[] = [ - 'FNDashboard', - 'hiddenVariables', - 'mode', - 'uid', - 'queryParams', - 'slug', - 'version', -] as const; - const INITIAL_MODE = GrafanaThemeType.Light; export const FN_STATE_KEY = 'fnGlobalState'; diff --git a/public/app/fn-app/fn-dashboard-page/fn-dashboard.tsx b/public/app/fn-app/fn-dashboard-page/fn-dashboard.tsx index 031c2858941f..93c50e5d3c52 100644 --- a/public/app/fn-app/fn-dashboard-page/fn-dashboard.tsx +++ b/public/app/fn-app/fn-dashboard-page/fn-dashboard.tsx @@ -1,8 +1,7 @@ -import { pick } from 'lodash'; import { FC, useMemo } from 'react'; -import { FnPropMappedFromState, fnPropsMappedFromState } from 'app/core/reducers/fn-slice'; -import { StoreState, useSelector } from 'app/types'; +import { FnGlobalState, FnPropMappedFromState } from 'app/core/reducers/fn-slice'; +import { useSelector } from 'app/types'; import { FnAppProvider } from '../fn-app-provider'; import { FNDashboardProps } from '../types'; @@ -20,12 +19,8 @@ export const FNDashboard: FC = (props) => { ); }; -function mapStateToProps() { - return ({ fnGlobalState }: StoreState) => pick(fnGlobalState, ...fnPropsMappedFromState); -} - export const DashboardPortal: FC = (p) => { - const globalFnProps = useSelector(mapStateToProps()); + const globalFnProps = useSelector(({ fnGlobalState }) => fnGlobalState); const props = useMemo( () => ({ diff --git a/public/microfrontends/fn_dashboard/index.html b/public/microfrontends/fn_dashboard/index.html index 3b6cc442ca4f..6093b21cd3c3 100644 --- a/public/microfrontends/fn_dashboard/index.html +++ b/public/microfrontends/fn_dashboard/index.html @@ -17,9 +17,9 @@ - + - + diff --git a/scripts/webpack/webpack.dev.js b/scripts/webpack/webpack.dev.js index da981a5a3839..2b1a14544fd6 100644 --- a/scripts/webpack/webpack.dev.js +++ b/scripts/webpack/webpack.dev.js @@ -26,10 +26,9 @@ const esbuildOptions = { }; const envConfig = getEnvConfig(); - module.exports = (env = {}) => { return merge(common, { - devtool: 'eval-source-map', + devtool: false, mode: 'development', entry: { @@ -76,7 +75,6 @@ module.exports = (env = {}) => { // removeEmptyChunks: false, // splitChunks: false, // }, - optimization: { moduleIds: 'named', runtimeChunk: true, @@ -96,6 +94,11 @@ module.exports = (env = {}) => { }, }, + performance: { + hints: false, + }, + parallelism: 2, + plugins: [ parseInt(env.noTsCheck, 10) ? new DefinePlugin({}) // bogus plugin to satisfy webpack API @@ -139,7 +142,7 @@ module.exports = (env = {}) => { new DefinePlugin({ 'process.env': { NODE_ENV: JSON.stringify('development'), - SHOULD_LOG: JSON.stringify('true'), + SHOULD_LOG: JSON.stringify(process.env.SHOULD_LOG), }, }), ],