eleventy-plugin-embed-svelte icon indicating copy to clipboard operation
eleventy-plugin-embed-svelte copied to clipboard

Malformed fileName when compiling on Windows

Open daemuth opened this issue 3 years ago • 0 comments

Issue description When compiling the plugin / example on Windows the user is presented with an error saying "Malformed fileName". The issue seems to be caused by the regex pattern /.*\/(.*)\./ expecting a forward slash (/) instead of a backslash (\).

Steps to reproduce

  1. Clone the repository in a Windows environment
  2. Run npm install in the cloned repository
  3. Build the plugin using the provided script (npm run build)
  4. Enter the example directory
  5. Run npm install
  6. Run npm run start
  7. Observe error

Workaround This issue can be bypassed by using the following regex pattern: /.*\\(.*)\./). Please note, however, that this introduces the reverse of the issue noted above, and as such a proper multi-platform solution should be introduced.

daemuth avatar Jan 19 '22 12:01 daemuth