Tweaked build settings

This commit is contained in:
Richard Davey 2018-09-20 16:58:23 +01:00
parent a39555a53d
commit 25813cec83
3 changed files with 9 additions and 17 deletions

View file

@ -1,14 +1,12 @@
let fs = require('fs-extra');
// let dest = '../phaser3-examples/public/build/dev.js';
// let destMap = '../phaser3-examples/public/build/phaser.js.map';
let source = './build/phaser-facebook-instant-games.js';
let sourceMap = './build/phaser-facebook-instant-games.js.map';
let dest = '../fbtest1/lib/dev.js';
let destMap = '../fbtest1/lib/phaser.js.map';
let destFolder = '../fbtest1/lib/';
let dest = '../fbtest1/lib/phaser-facebook-instant-games.js';
let destMap = '../fbtest1/lib/phaser-facebook-instant-games.js.map';
if (fs.existsSync(dest))
if (fs.existsSync(destFolder))
{
fs.copy(sourceMap, destMap, function (err) {
@ -30,7 +28,3 @@ if (fs.existsSync(dest))
});
}
else
{
// console.log('Copy-to-Examples failed: Phaser 3 Examples not present at ../phaser3-examples');
}

View file

@ -13,9 +13,7 @@ module.exports = {
phaser: './phaser.js',
'phaser.min': './phaser.js',
'phaser-arcade-physics': './phaser-arcade-physics.js',
'phaser-arcade-physics.min': './phaser-arcade-physics.js',
'phaser-facebook-instant-games': './phaser-facebook-instant-games.js',
'phaser-facebook-instant-games.min': './phaser-facebook-instant-games.js'
'phaser-arcade-physics.min': './phaser-arcade-physics.js'
},
output: {
@ -51,7 +49,8 @@ module.exports = {
"typeof CANVAS_RENDERER": JSON.stringify(true),
"typeof WEBGL_RENDERER": JSON.stringify(true),
"typeof EXPERIMENTAL": JSON.stringify(false),
"typeof PLUGIN_CAMERA3D": JSON.stringify(false)
"typeof PLUGIN_CAMERA3D": JSON.stringify(false),
"typeof PLUGIN_FBINSTANT": JSON.stringify(false)
}),
new CleanWebpackPlugin([ 'dist' ])

View file

@ -2,7 +2,6 @@
const webpack = require('webpack');
const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
const CleanWebpackPlugin = require('clean-webpack-plugin');
module.exports = {
mode: 'production',
@ -10,8 +9,8 @@ module.exports = {
context: `${__dirname}/src/`,
entry: {
'phaser-facebook-instant-games': './phaser-facebook-instant-games.js',
'phaser-facebook-instant-games.min': './phaser-facebook-instant-games.js'
'phaser-facebook-instant-games': './phaser.js',
'phaser-facebook-instant-games.min': './phaser.js'
},
output: {