You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unfortunately I was not able to use TailwindCSS with KVision, because currently KVision doesn't support ES modules. The code generated by the Kotlin/JS compiler uses require() calls and this seems to be not supported by PostCSS Tailwind plugin:
Module Error (from ../../node_modules/postcss-loader/dist/cjs.js):
Loading PostCSS "tailwindcss" plugin failed: require() of ES Module /home/rjaros/git/kvision-examples/tailwindcss/build/js/node_modules/snabbdom/build/index.js from /home/rjaros/git/kvision-examples/tailwindcss/build/js/packages/tailwindcss/kotlin/kvision.js not supported.
Instead change the require of index.js in /home/rjaros/git/kvision-examples/tailwindcss/build/js/packages/tailwindcss/kotlin/kvision.js to a dynamic import() which is available in all CommonJS modules.
Changing KVision to support ES modules is probably possible, but will require some work and most probably will introduce breaking changes.
It would be nice to have an example project, demonstrating the integration of TailwindCSS with KVision.
The text was updated successfully, but these errors were encountered: