Skip to content

Commit

Permalink
👷 [open-formulieren/open-forms#2177] Update build scripts
Browse files Browse the repository at this point in the history
Both changes are needed for the leaflet-draw and react-leaflet-draw dependencies.

leaflet-draw uses images for the different markers, which are included in the css. For this to work with the scss build, .png and .svg files use the dataurl loader https://esbuild.github.io/content-types/#data-url

Typescript errors in the react-leaflet-draw dependency caused a typescript validation/error, which shouldn't happen. Using `skipLibCheck` in the tsconfig.json type issues in the node_modules folder are ignored
  • Loading branch information
robinmolen committed Dec 18, 2024
1 parent a6fc4b6 commit e92bd4d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bundle-scss.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ await esbuild.build({
entryPoints: ['src/index.ts'],
outdir: 'lib/css',
bundle: true,
loader: {
".png": "dataurl",
".svg": "dataurl",
},
minify: false,
sourcemap: true,
plugins: [sassPlugin()],
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"strictNullChecks": true,
"allowSyntheticDefaultImports": true,
"noErrorTruncation": true,
"skipLibCheck": true,
"paths": {
"@/*": ["./*"],
"@/sb-decorators": ["../.storybook/decorators.tsx"]
Expand Down

0 comments on commit e92bd4d

Please sign in to comment.