This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-07-04
Channels
- # aleph (1)
- # aws-lambda (2)
- # beginners (30)
- # boot (2)
- # cider (7)
- # cljs-dev (65)
- # clojure (130)
- # clojure-denmark (1)
- # clojure-france (1)
- # clojure-germany (2)
- # clojure-greece (1)
- # clojure-italy (19)
- # clojure-kc (2)
- # clojure-nl (12)
- # clojure-poland (1)
- # clojure-russia (11)
- # clojure-spain (1)
- # clojure-spec (20)
- # clojure-uk (176)
- # clojurescript (65)
- # css (3)
- # cursive (8)
- # datomic (26)
- # editors (94)
- # emacs (10)
- # fulcro (66)
- # graphql (5)
- # midje (1)
- # off-topic (48)
- # om-next (2)
- # overtone (1)
- # re-frame (15)
- # reagent (6)
- # reitit (10)
- # shadow-cljs (68)
- # sql (3)
I just pushed 2.4.15
that now automatically deals with the global use of Buffer
which previously required an ugly hack. Anyone using such a Buffer
hack please try it without in 2.4.15
.
I adopted that behaviour since too many packages blindly use the global Buffer
and webpack
and others just rewrite it
web3
notoriously uses the Buffer
object almost everywhere which should just work now without any hacks
Hello, I'm getting this error in the main bundle of my app in Internet Explorer 11: Object doesn't support property or method 'includes'
, do I have to manually somehow include a polyfill to resolve this?
okay, I've done that for js projects using babel in the past but I'm a bit confused how to set it up with shadow-cljs, is there an example anywhere on how to do it?
@pontus.colliander which part of the code uses .includes? closure usually is supposed to automatically inject polyfills like that
looks to me like it's atlaskit npm module that I installed, it's inside a function named shadow$provide.module$node_modules$$atlaskit$analytics_next$dist$cjs$withAnalyticsEvents = function(a, k, b, f, c) {
ok found it. there is some weird interaction between the polyfills stuff and the node_modules
file polyfills get lost
I've been lately on and off cljs, was there any clean way to require .-default avaialable?
just from 2 months, I reopened a project and so many components were crashing, due to newer versions of libs are useing the default export option. But to be expected, easy fix.
@hlolli (:require ["thing" :default foo])
. not official yet but works in shadow-cljs. https://dev.clojure.org/jira/browse/CLJS-2376
are you guys using clj-fmt? Which linting/style tool are you using seems clj-fmt requires leiningen
I'm testing out webpack + shadow.cljs, I fell in love with the file loader in a different project. Was there ever an idea proposed to make a shadow-cljs loader, simply trigger shadow-cljs compile on changes/matched regex(for prod).
file loader is pointless. just compile with :npm-module
and include the file directly via import or require
hmm, does that work for images as well? One thing I liked was for example in scss, @import "~../../node_modules/slick-carousel/slick/slick.css";
this could just pack it into my css output.
If possible in CLJS, then I don't see reason to use webpack, but with webpack you can import an image and css with image-loader and css-loaders.
yeah I'm never ever going to implement that via ns
require
. I do however have plans to add something similar via some macros
ok I'm just experimenting. But webpack should understand js/require and that would trigger the loader, returning either image url or base64 of the image.
I used to hate webpack 🙂, but the idea of requireing styles from node_modules was an eye opener. And its way more stable than when I was struggling with it few years back.
yes I guess they do that. But I hacked js/require once when I was bundling a lumo app into a binary. Can be horrible and powerful.
I shouldn't have written the build reports feature, too much insights into the horrors of some JS packages 😛
yes, I think that awakening is everywhere. Of the js tools, very sad to see how gulp is sinking in standard. It was a potential for clean build and deploy tool. But all hot-reload tutorials for gulp, is basically useing webpack in gulp, with webpack-stream, and from that point, you're in js tool hell.
and no wepack boilerplate in the code, just purely combine compilations like they were indended, in streams
just today I added support for the dreaded global Buffer
support that works in node and the browser thanks to webpack
only
or I guess browserify
too. If they had just decided to not support it people would be using require("buffer")
properly instead today
really wish there was a package manager for JS that only accepted valid linted ES6 code
yes, start by haveing nodejs understanding it without babel, wasn't that the plan anyway, I take babel for granted.
just looking over my node_modules, always common.js I think, with source maps maybe to es6
I think every JS builds with even a small number of JS deps ends up including three different Object.assign
polyfills
isn't it possible now to publish both .es6 and .js, I've seen it many times with typescript based libs