clojure / clojurescript-site

website for ClojureScript
Eclipse Public License 1.0
107 stars 135 forks source link

Webpack guide contains problematic webpack command for later webpack versions #364

Closed Kah0ona closed 3 years ago

Kah0ona commented 3 years ago

On the webpack guide's page it says:

:bundle-cmd {:none ["npx" "webpack" "out/index.js" "-o" "out/main.js" "--mode=development"]
             :default ["npx" "webpack" "out/index.js" "-o" "out/main.js"]}

This suggests that there will be an out/main.js file generated. However, in later versions of webpack (it seems) that -o generates a folder, so in this case there would be a directory created called main.js, in which main.js, the file would reside. Also, it seems we need to prefix with ./ (see below)

I might be missing something, but I bumped into this yesterday. Not sure in which way we should improve this docs though. Maybe just edit the above command to reflect the latest situation? ie.:

:bundle-cmd {:none ["npx" "webpack" "./out/index.js" "-o" "./out/" "--mode=development"]
             :default ["npx" "webpack" "./out/index.js" "-o" "./out/"]}