Skip to content
Snippets Groups Projects
integrate.md 1.47 KiB
  • i18n: the form is already configured to use the lang tag of the mounting dom element, so if we set that from the website, we should be fine.
  • only show the LocaleSwitcher in dev mode

bundling

  • The built-in bundler (esbuild) of snowpack creates inline style elements dynamically, which the CSP doesn't allow. Better CSS support in esbuild is underway but not finished.
  • There is a experimental @snowpack/plugin-optimize plugin which has a preloadCSS option to gather all css into one file. That part works, but this plugin doesn't allow bundling the javascript parts, and the unbundled script files it outputs give errors in my browser.
  • The recommended (by snowpack authors) approach is to use @snowpack/plugin-webpack, but webpack errors out on the current source code.
  • After fixing above errors, with some effort I could load the contact form on the website.
    • However, the "urgent request" button doesn't have the effect it should have, of removing the regular submit button from the DOM, and creating the special urgent request submit button and text field. I checked, and the setUrgentIntent function does get called, so maybe the code that listens for that intent is not loaded for some reason?

TODO

  • fix absolute URLs to /static so they can be in a /staging subdirectory
  • load fonts from website, or not at all