Thanks Thomas for the link regarding the textarea, I might want to try that.
However I'd be very interested to learn why I should expect that this breaks advanced optimization (luckily it doesn't). What is your recommended pipeline? I. e. what module-type should I comp/transpile foreign libs to before adding them to ClojureScript. It seems that webpack is very flexible in that regard so all I'd have to know is what is best for ClojureScript. Thanks in advance, Leon. On Friday, October 30, 2015 at 9:54:01 AM UTC+1, Thomas Heller wrote: > This is very likely to break :advanced optimisations, did you test that yet? > > Probably not what you are looking for but there is a "goog.ui.Textarea" [1,2] > in the closure library which does the auto-sizing as well. Should be pretty > straighforward to make a react-wrapper for it. > > HTH, > /thomas > > [1] > https://github.com/google/closure-library/blob/master/closure/goog/ui/textarea.js > [2] > https://google.github.io/closure-library/source/closure/goog/demos/textarea.html > > On Friday, October 30, 2015 at 12:51:22 AM UTC+1, Leon Grapenthin wrote: > > 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 clojurescript+unsubscr...@googlegroups.com. To post to this group, send email to clojurescript@googlegroups.com. Visit this group at http://groups.google.com/group/clojurescript.