Skip to content

Latest commit

 

History

History
20 lines (14 loc) · 579 Bytes

vite-webpack-and-other-bundlers.md

File metadata and controls

20 lines (14 loc) · 579 Bytes

Usage with Vite, Webpack and other bundlers.

The recommended way to use Palmtree Form with Vite, Webpack or other bundlers is to install the package via npm (or yarn/bun):

npm install @palmtree/form --save

Then import the relevant parts into your project:

// src/main.ts
import '@palmtree/form/ajax';
import '@palmtree/form/form-collection';
import '@palmtree/form/recaptcha';

Each of the above imports has side effects, namely adding DOMContentLoaded event listeners to the document to initialize the relevant features.

Return to index