bhauman / figwheel-main

Figwheel Main provides tooling for developing ClojureScript applications
https://figwheel.org
Eclipse Public License 1.0
640 stars 93 forks source link

Metadata map `^{:auto-bundle :webpack}` in `dev.cljs.edn` for NPM generates error #262

Closed cloojure closed 4 years ago

cloojure commented 4 years ago

Running baseline hello-world.core example in NPM tutorial, have dev.cljs.edn:

^{:auto-bundle :webpack}
{:main hello-world.core
 ; :target     :bundle
 ; :bundle-cmd {:none ["npx" "webpack" "--mode=development" :output-to "-o" :final-output-to]}
}

creates error:

rm -rf target
clojure  -m figwheel.main  --build dev  --repl   # or -b, -r
2020-08-13 09:55:11.021:INFO::main: Logging initialized @3913ms to org.eclipse.jetty.util.log.StdErrLog
Configuration error in build options meta data: dev.cljs.edn
-- Unknown map key ----------------

  {:auto-bundle ...}
   ^^^^^^^^^^^^

should be one of

  :ring-stack, :client-log-level, :post-build-hooks, :validate-config, :ring-handler, :bundle-once, :repl-eval-timeout, :pprint-config, :log-level, :cljsjs-resources, :ring-server-options, :broadcast, :log-file, :reload-dependents, :mode, :helpful-classpaths, :connect-url, :extra-main-files, :inspect-node, :launch-js, :launch-node, :auto-testing, :open-url-wait-ms, :watch-dirs, :pre-build-hooks, :ansi-color-output, :rebel-readline, :ring-server, :broadcast-reload, :figwheel-core, :client-print-to, :final-output-to, :cljs-devtools, :hawk-options, :open-file-command, :build-inputs, :wait-time-ms, :validate-cli, :ring-stack-options, :target-dir, :hot-reload-cljs, :npm, :node-command, :load-warninged-code, :log-syntax-error-style, :reload-clj-files, :css-dirs, :open-url

-------------------------
Detected 1 error

Am I doing something wrong? It works if I uncomment the explicit :target and :bundle-cmd keys w/o using the metadata map.

bhauman commented 4 years ago

Make sure your using the latest version of Figwheel main.

Sent from ProtonMail Mobile

On Thu, Aug 13, 2020 at 10:58 AM, Alan Thompson notifications@github.com wrote:

Running baseline hello-world.core example in NPM tutorial, have dev.cljs.edn:

^{:auto-bundle :webpack} {:main hello-world.core ; :target :bundle ; :bundle-cmd {:none ["npx" "webpack" "--mode=development" :output-to "-o" :final-output-to]} }

creates error:

rm -rf target clojure -m figwheel.main --build dev --repl # or -b, -r 2020-08-13 09:55:11.021:INFO::main: Logging initialized @3913ms to org.eclipse.jetty.util.log.StdErrLog Configuration error in build options meta data: dev.cljs.edn -- Unknown map key ----------------

{:auto-bundle ...} ^^^^^^^^^^^^

should be one of

:ring-stack, :client-log-level, :post-build-hooks, :validate-config, :ring-handler, :bundle-once, :repl-eval-timeout, :pprint-config, :log-level, :cljsjs-resources, :ring-server-options, :broadcast, :log-file, :reload-dependents, :mode, :helpful-classpaths, :connect-url, :extra-main-files, :inspect-node, :launch-js, :launch-node, :auto-testing, :open-url-wait-ms, :watch-dirs, :pre-build-hooks, :ansi-color-output, :rebel-readline, :ring-server, :broadcast-reload, :figwheel-core, :client-print-to, :final-output-to, :cljs-devtools, :hawk-options, :open-file-command, :build-inputs, :wait-time-ms, :validate-cli, :ring-stack-options, :target-dir, :hot-reload-cljs, :npm, :node-command, :load-warninged-code, :log-syntax-error-style, :reload-clj-files, :css-dirs, :open-url


Detected 1 error

Am I doing something wrong? It works if I uncomment the explicit :target and :bundle-cmd keys w/o using the metadata map.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

cloojure commented 4 years ago

That fixed it. Doh! Thanks.