Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

webpack.config.d/moko-resources-generated.js is generated with invalid path on Windows #354

Closed
lupuuss opened this issue Jun 20, 2022 · 3 comments · Fixed by #438
Closed
Labels
bug Something isn't working
Milestone

Comments

@lupuuss
Copy link

lupuuss commented Jun 20, 2022

This line should generate path literal "C:\\users\\example\\projects\\test" on Windows, but it generates "C:\users\example\projects\test".

@Alex009
Copy link
Member

Alex009 commented Jun 23, 2022

why should be line with escaped ?

@lupuuss
Copy link
Author

lupuuss commented Jun 29, 2022

It leads to this line in generated js script const mokoResourcePath = path.resolve("C:\users\example\projects\test");. String literal is invalid because single \ is treated as escape character, but we need \ to be a part of a path so it must be repeated.

@Alex009 Alex009 linked a pull request Mar 12, 2023 that will close this issue
@Alex009 Alex009 added this to the 0.21.0 milestone Mar 12, 2023
@Alex009 Alex009 added the bug Something isn't working label Mar 12, 2023
@Alex009
Copy link
Member

Alex009 commented Mar 12, 2023

will be released in 0.21.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants