I solved this by compiling the library to UMD using webpack. Also, babel is
required as a loader to compile ES6 and JS6.
It might be worthwhile to write a beginners guide about how to deal with the
Javascript module world for people who never used JS as their first language.
I'd do it myself but lack expertise.
In any case, here is the webpack configuration file I wrote to get the above
package to compile so that it can be included via :module-type :commonjs - Your
input is very welcome.
module.exports = {
entry: "./src/TextareaAutosize.js",
module: {
loaders: [
{
test: /\.js$/,
loader: "babel?stage=0"
}],
},
output: {
path: __dirname + "/dist",
filename: "result.js",
libraryTarget: "umd",
library: "TextareaAutosize"
},
externals: {
"react": {root: "React"}
}
}
--
Note that posts from new members are moderated - please be patient with your
first post.
---
You received this message because you are subscribed to the Google Groups
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/clojurescript.