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
When the wrong path segment separator for the OS is used for output.chunkFileNames to put chunks in a subfolder, Rollup should error or generate a working bundle.
An alternative solution would be to change the docs to suggest using path.join('chunks','[name]-[hash].js'), instead of a forward slash.
Actual Behavior
Rollup outputs an invalid bundle if the POSIX separator is used on Windows. The chunks are not put into a folder, but rather the intended folder name is literally in the file name. The import paths have the intended structure, but those files do not exist.
I used an escaped backslash in the REPL to demonstrate the problem. The behavior is the same on Windows with a forward slash or on POSIX with a backslash.
Actually the intention was to always use forward slashes in the bundle object on all environments to have consistent bundle objects across environments. Until now I always assumed that fs.writeFile would work correctly on Windows (actually I just tried it in a Windows REPL and fs.mkdirSync and fs.writeFileSync handle forward slashes correctly). So I wonder what the actual issue is.
Expected Behavior
When the wrong path segment separator for the OS is used for
output.chunkFileNames
to put chunks in a subfolder, Rollup should error or generate a working bundle.An alternative solution would be to change the docs to suggest using
path.join('chunks','[name]-[hash].js')
, instead of a forward slash.Actual Behavior
Rollup outputs an invalid bundle if the POSIX separator is used on Windows. The chunks are not put into a folder, but rather the intended folder name is literally in the file name. The import paths have the intended structure, but those files do not exist.
I used an escaped backslash in the REPL to demonstrate the problem. The behavior is the same on Windows with a forward slash or on POSIX with a backslash.
This is a problem on shared boilerplates. Related issue: extend-chrome/js-react-boilerplate#2
The text was updated successfully, but these errors were encountered: