Skip to content

Commit

Permalink
fix: ditch dynamic imports
Browse files Browse the repository at this point in the history
Ran into this and a bunch of other weird errors from the arcgis/core library: vitejs/vite#11804 (comment) and ditching dynamic imports fixed them.
  • Loading branch information
stdavis committed Jan 12, 2024
1 parent 9f3ddaa commit 54ae30c
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/components/search-wizard/Wizard.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useMutation } from '@tanstack/react-query';
import ky from 'ky';
import { Suspense, lazy, useEffect, useState } from 'react';
import { Suspense, useEffect, useState } from 'react';
import { fieldNames } from '../../../functions/common/config.js';
import { schemas } from '../../../functions/common/validation.js';
import { useSearchMachine } from '../../contexts/SearchMachineProvider.jsx';
Expand All @@ -10,6 +10,10 @@ import SelectMapData from './SelectMapData.jsx';
import { useRemoteConfigValues } from '../../contexts/RemoteConfigProvider.jsx';
import { getConfigByTableName, getRelationships } from '../../utils.js';
import { useFirebase } from '../../contexts/useFirebase.jsx';
import AdvancedFilter from './AdvancedFilter.jsx';
import Download from './Download.jsx';
import DownloadProgress from './DownloadProgress.jsx';
import Progress from './SearchProgress.jsx';

/**
* @typedef {{
Expand All @@ -30,11 +34,6 @@ import { useFirebase } from '../../contexts/useFirebase.jsx';
* }} DownloadLayer
*/

const AdvancedFilter = lazy(() => import('./AdvancedFilter.jsx'));
const Download = lazy(() => import('./Download.jsx'));
const DownloadProgress = lazy(() => import('./DownloadProgress.jsx'));
const Progress = lazy(() => import('./SearchProgress.jsx'));

export default function SearchWizard() {
const [state, send] = useSearchMachine();
const [datasetConfigs, setDatasetConfigs] = useState({
Expand Down

0 comments on commit 54ae30c

Please sign in to comment.