marko-js-archive / marko-loader

DEPRECATED: see https://github.com/marko-js/webpack
MIT License
10 stars 12 forks source link

Webpack broken on Windows with 1.3.0 #6

Closed jasonmacdonald closed 7 years ago

jasonmacdonald commented 7 years ago

The following line in Index.js is breaking Windows builds in Webpack because window file paths are used. For example 'c:\Users\User\Desktop\somepath\test\index.marko' gets put in and Webpack then sees it as 'c:UsersUserDesktopSomepath\testsrcindex.marko\' and gives an error in the build output of var e = new Error("Cannot find module "c:UsersUserDesktopSomepath\testsrcindex.marko\""); e.code = 'MODULE_NOT_FOUND';; throw e; }()));. Reverting back to loader version 1.2.0 and everything works.

Here's the line that is causing the issue from what I can see.

if (!dependency.code) {
      // external file, just require it
      return `require('${dependency.path}');`
 }
jasonmacdonald commented 7 years ago

Still broken?

larixer commented 7 years ago

@jasonmacdonald Please wait a bit, I will check and return to you soon.

larixer commented 7 years ago

@jasonmacdonald Will be fixed once the Pull Request https://github.com/marko-js/marko-loader/pull/12 merged