Airtable database issues(javascript) | Project: hoggystyle

Ah I see what you mean now. So we can go one of two paths here – either we can try to get the require working on the frontend using webpack, or we can split the submitData function into 2 parts: 1 part that grabs the data from the elements in the DOM and then sends them to the server, and a second part that waits on the serverside to catch that data and pass it to Airtable.

The way that webpack works is that it bundles all your required files together, so that those require calls never go to the browser. It probably just needs some config, but I’ll take a look at your stuff and be able to give you better feedback.

This is an intro I found that seems pretty good → Webpack: When To Use And Why - Andy Ray's Blog