Kagami / boram

:film_strip: Cross-platform graphical WebM converter
https://github.com/Kagami/boram/releases
433 stars 30 forks source link

Failed to build on Windows because of unescaped character #27

Closed OrcaXS closed 6 years ago

OrcaXS commented 6 years ago

On Windows, npm run app would return

ModuleParseError: Module parse failed: C:\projects\boram\src\index\renderer.js Unexpected character '@' (18:0)
You may need an appropriate loader to handle this file type.

Because return new RegExp("^" + path.join(__dirname, ...parts) + "$"); returned something like ^c:\projects\boram\src\.+\.js$ which isn't a correct RegEx, so webpack (babel-loader) can't resolve correct path of .js and font-awesome .css files.

A simple block like

{
  test: /\.js$/,
  loader: "babel",
  include: path.join(__dirname, "src"),
},

could solve the problem, though it'd make the intree function unused.

Kagami commented 6 years ago

Thanks for the report. Please try now.