nkholski / phaser3-es6-webpack

Generic platformer and Phaser 3 bootstrap project
http://metroid.niklasberg.se/phaser3platformer/
703 stars 141 forks source link

How do I disable unused variables removal #23

Closed wyattbiker closed 5 years ago

wyattbiker commented 5 years ago

Would you know the best way to disable unused variable removal during dev? I need it for debugging.

For example I could have a variable initialed to number or an object, but never used.

I suspect it is the

        new HtmlWebpackPlugin({
            filename: '../index.html',
            template: './src/index.html',
            chunks: [ 'vendor', 'app' ],
            chunksSortMode: 'manual',
            minify: {
                removeAttributeQuotes: false,
                collapseWhitespace: false,
                html5: false,
                minifyCSS: false,
                minifyJS: false,
                minifyURLs: false,
                removeComments: false,
                removeEmptyAttributes: false
            },
            hash: false
        }),

Thanks!

nkholski commented 5 years ago

I'm not sure what you mean. If you type "window.bar = 'foo';" somewhere in the code you should be able to access bar in the console.