area17 / blast

Storybook for Laravel Blade 🚀
https://dev.to/area17/getting-started-with-blast-storybook-for-laravel-blade-c5c
Apache License 2.0
262 stars 37 forks source link

Fix ESM import path for Windows compatibility in resolveTailwindConfig #123

Closed jeramyhing closed 3 months ago

jeramyhing commented 4 months ago

Description

This PR addresses an issue encountered on Windows environments where the dynamic import in the resolveTailwindConfig function throws an ERR_UNSUPPORTED_ESM_URL_SCHEME error due to the file path not conforming to the file:// URL scheme expected by Node.js for ESM imports. By utilizing the pathToFileURL function from the url module, this change ensures that file paths are correctly formatted as URLs, making the script compatible across different operating systems, including Windows.

Changes

Motivation

Testing

How to Test

This PR brings the script in line with Node.js standards for ESM imports and ensures a more universal, error-free operation across different operating environments.

Resolves #122

mrtimbrook commented 3 months ago

Thanks!