Closed cowardcalf closed 4 years ago
Actually, I've found that was caused by missing the empty line at the end of the .js
file.
The issue will be gone when adding an empty line to each of the source file.
Interesting.
@cowardcalf Sorry for the delay. I'll look into it soon.
@cowardcalf Surprisingly this bug lasts so long. If there is no new line at the end of the code, the last line will be skipped, because an inner state flag collects a single line never gets a chance to end itself.
Anyway thanks for the issue. v1.1.1 has solved the problem. Try it out! https://www.npmjs.com/package/webpack-preprocessor-loader/v/1.1.1
@afterwind-io Thanks for the quick response and the immediate fixing. I'll try the new fresh v1.1.1 release.
Are you going to close this issue?
@cowardcalf Seems the actual flaw is a little more tricky than I have thought. The problem here is what on the last line(single/multiple characters in this case, which I was missing), rather than file format.
I have bumped another update to cover more cases. It should be working now. https://www.npmjs.com/package/webpack-preprocessor-loader/v/1.1.2
That's a quick fixing. Yes, I guess it was file format irrelevant. I'll try the new release soon. Thanks again.
@afterwind-io I've tested new release. So far so good. Thank you for your efforts.
Hi, @afterwind-io
I've found this loader does not work in the case when having export default from another imported default module.
For example,
It will throw errors when compling
It would be glad to see any response from you. Thanks.