elm-webpack-loader icon indicating copy to clipboard operation
elm-webpack-loader copied to clipboard

Fix error when compiling files with dashes in Path

Open MMMMMNG opened this issue 7 months ago • 0 comments

Fixes #180

Compiling Main.elm always failed for me with a really unhelpful message:

I do not recognize this flag:

    -

Maybe you want one of these instead?

    --docs=<json-file>
    --debug
    --output=<output-file>
    --report=<report-type>
    --optimize

I was stumped until I saw issue #180. I made sure my path (which contained a dash surrounded by spaces) actually was the problem by executing elm make <full - path without quotation marks> and got the same message.
Then I edited node_modules/elm-webpack-loader/index.js directly and found that wrapping the path(s) with quotation marks fixes the problem. But I have only tested this on windows, so I'm not sure how robust it is.

MMMMMNG avatar Apr 26 '25 18:04 MMMMMNG