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
In my recent Laravel + Tailwind installation, tailwind.config.js is included as an ES Module. This causes the following error on blast:launch and blast:publish:
php artisan blast:launch
0/2 [░░░░░░░░░░░░░░░░░░░░░░░░░░░░] Reusing npm dependencies...
1/2 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░] Generating Stories...Error [ERR_REQUIRE_ESM]: require() of ES Module /e/server/gigsalad-laravel/laravel/tailwind.config.js
from /e/server/gigsalad-laravel/laravel/vendor/area17/blast/src/resolveTailwindConfig.js not supported.
Instead change the require of tailwind.config.js in /e/server/gigsalad-laravel/laravel/vendor/area17/blast/src/resolveTailwindConfig.js to a dynamic import()
which is available in all CommonJS modules.
at Object.<anonymous> (/e/server/gigsalad-laravel/laravel/vendor/area17/blast/src/resolveTailwindConfig.js:6:18) {
code: 'ERR_REQUIRE_ESM'
}
By supporting both ESM and CommonJS formats, Blast will be more able to provide documentation "out of the box" going forward.
The text was updated successfully, but these errors were encountered:
johnbacon
changed the title
Feature Request: Support tailwind.config.js in ESM format
Feature Request: Support tailwind.config.js in default ESM format
Sep 28, 2023
In my recent Laravel + Tailwind installation,
tailwind.config.js
is included as an ES Module. This causes the following error onblast:launch
andblast:publish
:It appears Tailwind generates an ESM config file by default depending on other settings in your project: https://tailwindcss.com/docs/configuration#using-esm-or-type-script
And it looks like Laravel has configured
package.json
astype: module
since version 10.2: https://github.com/laravel/laravel/blob/25070a3ffb175c15b59cd7f12289a9648165bba3/CHANGELOG.md?plain=1#L34By supporting both ESM and CommonJS formats, Blast will be more able to provide documentation "out of the box" going forward.
The text was updated successfully, but these errors were encountered: