ff-stream-web

git clone git://archive.git.mtrnord.blog/MTRNord/ff-stream-web.git
Log | Files | Refs | README | LICENSE

commit 7e8b4f2dac3aea84c9343bfb52021273705f377d
parent 6878c79dd6974e6d4571601b3a00863b3a850211
Author: Konstantin Tarkus <koistya@gmail.com>
Date:   Sat, 20 Feb 2016 15:29:38 +0300

Merge pull request #450 from codeorelse/add_IS_BROWSER_and_IS_SERVER_flags

Add 'process.env.BROWSER' flag
Diffstat:
Mtools/webpack.config.js | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/webpack.config.js b/tools/webpack.config.js @@ -120,7 +120,7 @@ const clientConfig = extend(true, {}, config, { // http://webpack.github.io/docs/configuration.html#devtool devtool: DEBUG ? 'cheap-module-eval-source-map' : false, plugins: [ - new webpack.DefinePlugin(GLOBALS), + new webpack.DefinePlugin({ ...GLOBALS, 'process.env.BROWSER': '"true"' }), new AssetsPlugin({ path: path.join(__dirname, '../build'), filename: 'assets.js', @@ -174,7 +174,7 @@ const serverConfig = extend(true, {}, config, { }, devtool: 'source-map', plugins: [ - new webpack.DefinePlugin(GLOBALS), + new webpack.DefinePlugin({ ...GLOBALS, 'process.env.BROWSER': '"false"' }), new webpack.BannerPlugin('require("source-map-support").install();', { raw: true, entryOnly: false }), ],