SoPhased Posted July 21, 2017 Share Posted July 21, 2017 I just downloaded phaser with npm and after running webpack I'm stuck with a 8mb javascript file. Is there any way to not have a 8mb file? Thanks. Link to comment Share on other sites More sharing options...
rich Posted July 21, 2017 Share Posted July 21, 2017 Not entirely sure what you've managed to do in your config, but the full version of Phaser, with all extensions included, all jsdocs kept and unminified and not gzipped, is only 3.1MB. So where you've got all that extra from I've no idea! Link to comment Share on other sites More sharing options...
SoPhased Posted July 21, 2017 Author Share Posted July 21, 2017 I followed the Phaser instructions for a webpack build. Quote var path = require('path'); var webpack = require('webpack'); var phaserModule = path.join(__dirname, '/node_modules/phaser/'); var phaser = path.join(phaserModule, 'build/custom/phaser-split.js'), pixi = path.join(phaserModule, 'build/custom/pixi.js'), p2 = path.join(phaserModule, 'build/custom/p2.js'); module.exports = { ... module: { loaders: [ { test: /pixi.js/, loader: "script" }, ] }, resolve: { alias: { 'phaser': phaser, 'pixi.js': pixi, 'p2': p2, } } ... } Link to comment Share on other sites More sharing options...
Recommended Posts