tailwindcss-jit-cdn icon indicating copy to clipboard operation
tailwindcss-jit-cdn copied to clipboard

Adding options and observerElement

Open tnylea opened this issue 4 years ago • 0 comments

Hey Marcel 👋,

I've gone ahead and added an option for oberserverElement.

I added this to the main.js file, where it will merge a default options object with window.tailwindOptions. This will allow the ability for us to add even more options down the road.

If there is a more efficient way that you feel that I should implement this, let me know.

For now, if you include:

window.tailwindOptions = {
    observerElement: document.getElementById('app')
};

above the CDN script tag, you can define the element that you want the JIT CDN to observe.

Thanks again for this awesome script ;)

tnylea avatar Jun 22 '21 17:06 tnylea