This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-10-17
Channels
- # 100-days-of-code (5)
- # announcements (13)
- # beginners (98)
- # boot (19)
- # cider (10)
- # cljdoc (32)
- # clojure (142)
- # clojure-dev (37)
- # clojure-italy (3)
- # clojure-nl (2)
- # clojure-spec (30)
- # clojure-uk (18)
- # clojurescript (28)
- # cursive (8)
- # datomic (25)
- # duct (18)
- # editors (5)
- # emacs (39)
- # events (4)
- # figwheel (7)
- # figwheel-main (5)
- # fulcro (38)
- # graphql (19)
- # jobs-discuss (1)
- # jobs-rus (7)
- # keechma (1)
- # lumo (47)
- # off-topic (28)
- # om-next (3)
- # parinfer (3)
- # re-frame (18)
- # reagent (37)
- # reitit (8)
- # shadow-cljs (101)
- # specter (7)
- # tools-deps (8)
- # vim (1)
@pesterhazy I’m not sure, if you are pointing out a bug in figwheel or not
@pesterhazy I can recommend to use node dependencies in that way: webpack.config.js
module.exports = {
entry: './src/js/index.js',
output: {
filename: 'index_bundle.js'
}
}
figwheel-main.edn
{:npm {:bundles {"dist/index_bundle.js" "src/js/index.js"}}}
src/js/index.js
window.React = require("react");
window.ReactDOM = require("react-dom");
window.Highlight = require("react-highlight").default;
// material-ui
import {createMuiTheme, MuiThemeProvider} from '@material-ui/core/styles';
window.MaterialUiStyles = {
createMuiTheme: createMuiTheme,
MuiThemeProvider: MuiThemeProvider
}
window.MaterialUiCore = {
AppBar: require("@material-ui/core/AppBar").default,
Button: require("@material-ui/core/Button").default,
Drawer: require("@material-ui/core/Drawer").default,
ExpansionPanel: require("@material-ui/core/ExpansionPanel").default,
ExpansionPanelSummary: require("@material-ui/core/ExpansionPanelSummary").default,
ExpansionPanelDetails: require("@material-ui/core/ExpansionPanelDetails").default,
IconButton: require("@material-ui/core/IconButton").default,
Grid: require("@material-ui/core/Grid").default,
Paper: require("@material-ui/core/Paper").default,
TextField: require("@material-ui/core/TextField").default,
Toolbar: require("@material-ui/core/Toolbar").default,
Typography: require("@material-ui/core/Typography").default
}
run
yarn webpack --mode=development
Then in cljs
(ns material-ui.core
(:require [reagent.core :as r]
[material-ui-styles :as mui-style]
[material-ui-core :as mui-core]))
(def grid (r/adapt-react-class mui-core/Grid))
BTW I will publish this example when I will find free time (next 14-30 days?). I have to finish my library before publish.
@bhauman the websocket error turned out to be caused by a development proxy (adds service sub-domains) that doesn’t forward websockets correctly. If I can find the time, I’d like to figure out how to return a better error than “undefined” when the connection closes unexpectedly.
Hi all: I had a wonderful little boot framework task that would watch certain important namespaces and restart the running web server if those namespaces changed, and then a downstream task to build web assets. It worked really well for a reloaded workflow, but some of the boot tasks in the pipeline were a bit slow. I'm now trying recreate this in lein (partly for learning, partly because it seems faster) and I'm wondering how folks would set this up along side something like figwheel-main? Is it preferable to use something like lein-cooper
+ lein-auto
to launch a server restart task in parallel with figwheel-main? Or is it better to just launch a repl and then do every with the scripting api: both server restarts and the figwheel-main builds?