using webpack to generate a distribution version in ./lib/dist.js

This commit is contained in:
Nicolas Dextraze 2016-03-09 17:03:26 -08:00
parent 05e693d7b9
commit 74a9cdc532
3 changed files with 4893 additions and 1 deletions

View File

@ -8,4 +8,4 @@
* library is heavy on number of files so it could have negative impact on load time
* we need a compiled (single file) version of the library
*/
module.exports = require('./src/client.js');
module.exports = require('./lib/dist.js');

4878
lib/dist.js Normal file

File diff suppressed because it is too large Load Diff

14
webpack.config.js Normal file
View File

@ -0,0 +1,14 @@
module.exports = {
entry: "./src/client.js",
target: "node",
output: {
filename: "./lib/dist.js",
libraryTarget: "commonjs2"
},
externals: [
/^[^\.]/,
{
"../messages/clientMessage": "../src/messages/clientMessage"
}
]
};