Skip to content

Instantly share code, notes, and snippets.

@olieidel
Created September 3, 2018 08:52
Show Gist options
  • Save olieidel/1a4ea3b38ca117417ca72bcac582b481 to your computer and use it in GitHub Desktop.
Save olieidel/1a4ea3b38ca117417ca72bcac582b481 to your computer and use it in GitHub Desktop.
ClojureScript webpack dependencies
(def foreign-libs
[{:file "src/js/foreign-libs.js"
:provides ["cljsjs.react"
"cljsjs.react.dom"
"cljsjs.three"
"intercom.io"
"material-ui"]
;; see https://clojurescript.org/news/2017-07-30-global-exports
:global-exports '{cljsjs.react React
cljsjs.react.dom ReactDOM
cljsjs.three THREE
material-ui MUI
intercom.io Intercom}}])
(defproject foo "0.1.0"
;; ...
:cljsbuild {:builds
[{:id "dev"
;; ...
:foreign-libs ~foreign-libs
:externs ~externs}]
(ns foo.some-file
(:require [cljsjs.three :refer [DataTexture Mesh]))
;; ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment