That's fantastic, great work
added some more :bundle support features this morning
:bundle-cmd
command templates will now have :final-output-dir
and :final-output-filename
in addition to :output-to
and :final-output-to
which allows us to use the webpack and parcel cli’s better
AND I added better logging when a bundle command fails so that you can see the output of the failed command
AND finally I added an :auto-bundle
figwheel option which can take either a :webpack
or :parcel
keyword
the :auto-bundle
option will set all the default config for you
^{:auto-bundle :webpack} {:main example.core}
is a complete config for working with NPM
@bhauman I realize it’s probably not a priority, but out of curiosity: do you expect yarn to work as more or less drop in replacement of npm? I prefer yarn but I’m probably in the minority
oh absolutely
neither figwheel or cljs depend on what you use to populate node_modules
I should clarify that in the docs I guess
cool 🙂 yea I thought it would probably work;
to bad NPM is kinda overloaded
back in the day, npm was a huge mess and it was causing all sorts of weird issues and non-repeatable builds… yarn was a life-saver back then… I believe they’ve fixed it now (but I’m sticking with yarn)
@bhauman Loving the latest features! I upgraded our ten thousands of lines cljs project to 0.2.6, build and auto testing works great.
@ingesol Awesome!!
released figwheel-main 0.2.7-SNAPSHOT
with latest improvements
@bhauman I’m just trying to configure my library and usage example with parcel + figwheel-main instead of shadow-cls + rollup https://github.com/just-sultanov/clj-monaco Anyway thank you for your work on figwheel 👍
Awesome 🔥 Thank you.
I’m trying to configure the project using parcel
with the next config, but I got some spec errors Unknown map key:
:final-output-filename` and :final-output-dir
` Did I set up something wrong?
^{:open-url false
:watch-dirs ["src"]
:final-output-dir "public/assets"
:final-output-to "public/assets/app.js"
:final-output-filename "public/assets/bundle.js"}
{:main example.core
:target :bundle
:output-dir "target/public/assets"
:output-to "target/public/assets/app.js"
:bundle-cmd {:none ["npx" "parcel" "build" :output-to
"--out-dir" :final-output-dir
"--out-file" :final-output-filename
"--no-minify"]
:default ["npx" "parcel" "build" :output-to
"--out-dir" :final-output-dir
"--out-file" :final-output-filename]}
:closure-defines {cljs.core/*global* "window"}}
:final-output-filename
isn’t a figwheel-compile option
just supply :final-output-to
and figwheel spits it into :final-output-dir
and :final-output-filename
for you
in your example you want :final-output-to
to be "public/assets/bundle.js"
this is bleeding edge so the docs aren’t quite there yet
Oh, thank you. I seem to have figured out the options. But I still could not configure parcel with tailwindcss and monaco-editor. Example with momentjs is very simple. I'll try again tomorrow
Or do I need to build assets separately from clojurescript application to e.g. vendor.js
If I can to configure everything, I will publish a step-by-step guide 😃