Created
June 22, 2016 09:31
-
-
Save diem1/c752080db8ea2a1b59cc3822fbce9de1 to your computer and use it in GitHub Desktop.
Revisions
-
diem1 created this gist
Jun 22, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,2 @@ var domain = process.env.DOMAIN || null; console.log(domain); This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,41 @@ var ExtractTextPlugin = require("extract-text-webpack-plugin"), webpack = require('webpack'); module.exports = { node: { fs: "empty" }, entry: './index', output: { path: __dirname, filename: 'bundle.js' }, module: { loaders: [ { test: /\.css$/, loader: ExtractTextPlugin.extract('style-loader', 'css-loader') }, { test: /.js?$/, loader: 'babel-loader', exclude: /node_modules/, query: { presets: ['es2015', 'react'] } } ] }, plugins: [ new ExtractTextPlugin('bundle.css'), new webpack.DefinePlugin({ 'process.env': { 'DOMAIN': JSON.stringify(process.env.DOMAIN) } }) ], devServer: { port: 8080, historyApiFallback: true } }