Skip to content

path.resolve breaks module loading on Windows #15

@luca-0x

Description

@luca-0x

Hello,
i've found the issue thru single-spa, since the latest version, if you have modules that contain the "/" character and you are running on Windows, SystemJS will replace the forward slash with a backward slash ("\").
The issue here is that the path.resolve used here will replace the slashes in the module name with the slash used by the OS

This is the error that i'm encountering (notice the module name with the backward slash even tho i'm importing it as "@example/root-config"):
Uncaught (in promise) Error: systemjs-webpack-interop: There is no such module '@example\root-config' in the SystemJS registry. Did you misspell the name of your module? at setPublicPath (public-path.js:35) at Module.<anonymous> (resource-query-public-path.js:10) at Module../node_modules/systemjs-webpack-interop/resource-query-public-path.js?systemjsModuleName=@example\root-config&rootDirectoryLevel=1 (resource-query-public-path.js:10) at __webpack_require__ (bootstrap:19) at Object.1 (example-root-config.js:10018) at __webpack_require__ (bootstrap:19) at bootstrap:83 at Object.execute (bootstrap:83) at doExec (system.js:471) at postOrderExec (system.js:467)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions