-
Notifications
You must be signed in to change notification settings - Fork 94
webpack example needed #271
Comments
+1 |
This would be very important. I've tried for hours to get Jaydata + Webpack work with no success. Since webpack is currently pretty much the only supported (or at least somewhat documented) way for bundled angular2 applications, Jaydata currently prevents me from shipping a release version of the application. The development version using SystemJS is working, however. But we can't ship with a full |
@lazarv ^^ |
Sorry for being so late with the webpack support fix, please update JayData to latest version from npm (1.5.10). You have to include the json-loader in the webpack config file. A simple example webpack.config.js: var webpack = require("webpack");
module.exports = {
entry: "./index.js",
output: {
path: __dirname,
filename: "bundle.js"
},
module: {
preLoaders: [
{ test: /\.json$/, loader: "json" }
]
},
plugins: [
new webpack.optimize.UglifyJsPlugin({ minimize: true, compress: { warnings: false } }),
new webpack.optimize.OccurrenceOrderPlugin()
]
}; |
I added the json-loader (I had it in my project for other libs) but still there are problems with webpack: Main cause is that under webpack, Jaydata will Edit/Note: Now that I think of it, lazy (async) loading is not supported in CommonJS modules (and thus not in webpack). Currently, jaydata tries to load the storage provider (i.e. odata) once |
Just |
I'm having a hard time getting JayData working in a Angular2-application using Webpack as module loader.
Is there an example available of how to set up JayData with Webpack?
The text was updated successfully, but these errors were encountered: