fix: bundle paths on windows (reverts https://github.com/egoist/rollup-plugin-postcss/pull/190) #384
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I am attempting to run the project Owncloud which runs fine in MacOS / Linux environments but fails in Windows.
This project uses postcss v8.2.15.
Below is the error:
It appears related to this dependency, specifically (and ironically) it seems the
normalizePath
method is not working as expected and prevents the resolution of thebundles
dictionary from working properly.I have reverted the original code change which discusses fixing this issue initially (see #190) - it is possible other dependent libraries have been patched or updated since this PR was accepted rendering it obsolete and actually causing the very problem it aims to solve.
I locally built and replaced the
node_modules/rollup-plugin-postcss/dist/index.js
on the original project with the build based on this PR source code branch, and it fixed the issue (see screenshot below):I have tested this with multiple versions of Node.js (v12/v14 LTS) and also on Windows/WSL2 (Ubuntu) and Windows vanilla (Command Prompt) and MacOS.
Happy to answer any questions or test out further scenarios if you have a hesitation to accept this change.