azproduction/lmd

String modules getting corrupted on Windows when using source map.

Closed this issue · 3 comments

If you have a string module, then in output file its LMD_TOKEN token is not removed when using source maps and building on Windows.
It becomes like

"testModule": "/**[[LMD_TOKEN]]:D:\\www\\html\\test\\test.html**/Test",

It happens because string modules are actual string and Windows-style directory separator (\) gets escaped (\\) in contrary to plain modules. So when you search this token in code, it won't be found.
Affected condition: https://github.com/azproduction/lmd/blob/master/bin/lmd_builder.js#L1451

Thank you. Fixing.

I have fixed this, but I can't publish package, because npm is unhealthy now. If this fix is important to you, you can install lmd from github on sha 0d75523eb210d5e775f6c88d2bc9a2a6e82fff5b. I will publish new package later.

Fixed in lmd@1.11.6