-
-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
webpack-cli 4.3.0 has broken auto bundling #278
Comments
Crosslink: clojure/clojurescript-site#364 |
Further links: A setup that works: ;; dev.cljs.edn
{:main my.core
:target :bundle
:bundle-cmd {:none [:npx-cmd "webpack" "--mode=development"
"--entry" :output-to
"--output-path" :final-output-dir]
:default [:npx-cmd "webpack" "--mode=production"
"--entry" :output-to
"--output-path" :final-output-dir]}} Note: default Can be loaded with: <script src="cljs-out/dev/main.js" type="text/javascript"></script> |
Scrach my last comment, setup not ideal, it bundles like so: npx webpack --mode=development \
--entry ./target/public/cljs-out/dev/main.js
--output-path ./target/public/cljs-out/dev Seems same file is both input and output. |
This module.exports = {
output: {
filename: "bundle.js"
}
}; |
@bhauman the bug I reported results from changes to webpack-cli (not webpack) and were committed in December, so it would have been very impressive indeed if you had fixed them in October 😉. However I've just updated to webpack-cli 4.4.0, and it looks like it now works again, so I guess that they worked out that they had broken things... |
Sorry - ignore that last comment - I am an idiot. I am still seeing the problem with webpack-cli 4.4.0. |
So I would need to know more about your set up because, things are working for me on My build (a new figwheel-main-template build) doesn't have multiple webpack build processes running at the same time. webpack builds run synchronously in figwheel-main |
@bhauman - the problem isn't with webpack. It's with webpack-cli. I've just confirmed that I get the problem with a project created using the figwheel-main template, specifically:
Edit This gives:
|
@bhauman |
Hmmm well I get this failure when I try that.
This is a bunch of fun. I'm using Wasn't webpack-cli 4.4 created to support webpack 5? |
@clyfe if you use webpack-cli 4.4 with webpack 5 then Or if you use webpack-cli 3.3 with webpack 4 then But not webpack-cli 4.4 with webpack 4. Of course this is ridiculous and not something simply solved. Hopefully after Webpack 5 things will stabilize? Not likely. |
These are the setup where |
I'm also seeing the same issue with webpack 5.19.0, webpack-cli 4.4.0. |
Oh well darn. Thank you for letting me know. It used to work for webpack 5. Sorry for the resistance on my end. It took a bit of sorting out the first time.
Can you imagine a single set of parameters that will work on the cli across both versions?
Sent from ProtonMail Mobile
…On Sat, Jan 30, 2021 at 2:48 AM, clyfe ***@***.***> wrote:
➜ npx webpack --version
webpack 5.18.0
webpack-cli 4.4.0
These are the setup where --output-filename is not recognized for me.
—
You are receiving this because you were mentioned.
Reply to this email directly, [view it on GitHub](#278 (comment)), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/AAAAUQBKN3YSJ32OBQOOYU3S4PBXBANCNFSM4VNCCUGQ).
|
Seems this: :none [:npx-cmd "webpack" "--mode=development"
"--entry" :output-to
"--output-path" :final-output-dir
"--output-filename" :final-output-filename] Results in this: [Figwheel] Bundling: npx webpack --mode=development \
--entry ./target/public/cljs-out/dev/main.js \
--output-path ./target/public/cljs-out/dev \
--output-filename main_bundle.js And it works, so Figwheel change should be just: adding the "entry" bit |
This is odd right because |
OK I tested this out and it works in most cases but not in the case where webpack 4 is used with webpack-cli 4, which is hopefully just not going to happen that often. I deployed a SNAPSHOT [figwheel-main 0.2.13-SNAPSHOT]. @clyfe @paulbutcher please give it a try and see if it fixes your problems. @paulbutcher I haven't been able to reproduce your error, but it may be related. What platform (os) are you using? |
|
@bhauman 0.2.13-SNAPSHOT fixes it for me. |
Enabling auto-bundling with
webpack-cli
4.3.0 results in the following error:It seems to have been caused by this monster commit with the helpful description of "refactor: code":
webpack/webpack-cli@10fb66e
I'll see if I can work out what's going on and put a pull request together which addresses it.
The text was updated successfully, but these errors were encountered: