Created
September 10, 2015 15:33
-
-
Save sgrove/3823db668c684cd6a214 to your computer and use it in GitHub Desktop.
cljs + webpack interop sketch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Example config | |
:libs [;; Provides is what you would (:require [ReactMotion :as rm | |
;; and ends up as exports.ReactMotion | |
{:provides ["ReactMotion"] | |
:native-name ["react-motion"] | |
:preprocess :webpack | |
:webpack-options {. .}} | |
{:provides ["React"] | |
:native-name ["react"] | |
:preprocess :webpack | |
:webpack-options {. .}}] | |
;; The output of this would be an auto-generated (hash lib).js file like this: | |
;; var ReactMotion = require('react-motion') | |
;; var React = require('react') | |
;; exports.ReactMotion = ReactMotion | |
;; exports.React = React | |
;; Then webpack would combine all | |
;; of the libs into a single js | |
;; output file (with no | |
;; optimizations applied, just | |
;; dependency deduping, e.g. making | |
;; it loadable by the browser) that | |
;; would be included in cljs build process. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment