Add usage with scalajs-bundler to Documentation
I'm not sure if there is more to do beside documentation, but this look pretty nice as an alternative to systemjs: https://github.com/scalacenter/scalajs-bundler But actually I didn't get this working with angulate2, so if you know how to make this work, a hint inside the readme would be great
Did you include the -sjsx.js file? Anyway, this problem might be solved when #60 is implemented.
the -sjsx.js file containt this line:
var s = require('scalaModule');
which should be
var s = require('./scalajs-bundler/projectname-fastop-bundle.js');
I modified my webpack config in away, that it modifies the -sjsx file to fix this, but it would be great if it would work without a hacky workaround
@Cedware OK, if that's all you need to change, just set
ngScalaModule := "./scalajs-bundler/projectname-fastop-bundle.js"
in your build.sbt.
@Cedware Finally I've tried scalajs-bundler myself, and I#m having some issues with module resolution (rxjs/Observable cannot be found). Did you encounter similar problems?
@jokade I didn't had any problems like this, but I haven't been using rxjs explicit. Did you require rxjs in your own code or did the exception happen in some angular code? If you want to provide me your test project, I could take a look in it.
@jokade For the usage with a module bundler like it would be a huge advantage to include:
require("core-js")
require("core-js/es7/reflect")
require("zone.js")
into the -sjsx file. So the will be included into the bundle. If we have to reference them inside the .html file we have to make sure to place them at the right location
You can add these via sjsxSnippets in build.sbt:
sjsxSnippets += SJSXSnippet(0,"""require("core-js")""")
However, I'm planning tighter integration with scalajs-bundler for the 0.1.0 release
Alright this is great :) I'm working on a alternative to scalajs-bundler with stealjs. I think the bundling progress is to slow for development
Hmm, I'm using system.js for dev, and I think it would be great, if scalajs-bundler would support various strategies (system.js, webpack, stealjs, ...)