Skip to content

Commit

Permalink
Merge pull request #146 from noahm/webpack-json-destructure-bug
Browse files Browse the repository at this point in the history
No destructuring returns from dynamic json imports
  • Loading branch information
noahm committed May 30, 2023
2 parents 0af6529 + 83d2bbf commit 3c2a67c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/draw-state.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,11 @@ export const useDrawState = createStore<DrawState>((set, get) => ({
});
writeDataSetToUrl(dataSetName);

const { default: data } = await import(
/* webpackChunkName: "songData" */ `./songs/${dataSetName}.json`
);
const data = (
await import(
/* webpackChunkName: "songData" */ `./songs/${dataSetName}.json`
)
).default;
set({
gameData: data,
drawings: [],
Expand Down

1 comment on commit 3c2a67c

@vercel
Copy link

@vercel vercel bot commented on 3c2a67c May 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

ddr-tools – ./

ddr.tools
ddr-tools-git-main-noahm.vercel.app
ddr-tools-noahm.vercel.app

Please sign in to comment.