Using ampersand-model with webpack creates an invalid bundle.
The error require is not defined occurs on line 14654 (caused by module.exports = require("net");).
Below is a snippet that reproduces the problem.
Surprisingly, the exact same config works perfectly when using only ampersand-view.
Bonus point: this way, the (broken) bundle is made of 54756 lines. With browserify it's a working bundle made of 8406 lines. Any idea on the huge difference of file weight?
app.js
var Model = require('ampersand-model');
module.exports = Model.extend({});
Using
ampersand-model
with webpack creates an invalid bundle. The errorrequire is not defined
occurs on line 14654 (caused bymodule.exports = require("net");
).Below is a snippet that reproduces the problem. Surprisingly, the exact same config works perfectly when using only
ampersand-view
.Bonus point: this way, the (broken) bundle is made of 54756 lines. With browserify it's a working bundle made of 8406 lines. Any idea on the huge difference of file weight?
app.js
index.html
package.json
webpack.config.js