summaryrefslogtreecommitdiffstats
path: root/docs/index.rst
AgeCommit message (Expand)AuthorFilesLines
2018-09-13Switch theme and add report issueRich Bennett1-2/+2
2018-09-01Cherry pick beijing improvements to masterRich Bennett1-5/+3
2018-08-31DOC - Updating location of the VNFRQTSBozawglanian, Hagop (hb755d)1-0/+1
2018-06-14Add description of master and stable releasesRich Bennett1-0/+10
2018-01-16Create use case example and structureRich Bennett1-0/+1
2017-11-03Multiple editorial improvementsRich Bennett1-3/+2
2017-09-14Add aai/search-data-service as submodule to docsMatthewHarffy1-1/+1
2017-09-13Enhancement and additions for webinarRich Bennett1-6/+4
2017-07-25[DOC-57 Add vnfrqts/guidelines submodule]Rich Bennett1-5/+9
2017-07-19[DOC-23]Initial structure and Documentation GuideRich Bennett1-0/+20
Literal.Number.Integer.Long */
'use strict';

const path = require('path');
const webpack = require('webpack');
const proxyServer = require('./proxy-server');

let localDevConfig = {};
try {
	localDevConfig = require('./devConfig');
} catch (e) {}
let devConfig = Object.assign({}, require('./devConfig.defaults'), localDevConfig);
let devPort = process.env.PORT || devConfig.port;

let webpackCommon = require('./webpack.common');

function getEntrySources(sources) {
	for (let i in sources) {
		if (sources.hasOwnProperty(i)) {
			sources[i].push('react-hot-loader/patch');
			sources[i].push('webpack-dev-server/client?http://localhost:' + devPort);
			sources[i].push('webpack/hot/only-dev-server');
		}
	}
	return sources;
}

let webpackDevConfig = Object.assign({}, webpackCommon, {
	entry: getEntrySources(devConfig.bundles),
	devtool: 'eval-source-map',
	output: {
		path: path.join(__dirname, 'dist'),
		publicPath: `http://localhost:${devPort}/onboarding/`,
		filename: '[name].js'
	},
	devServer: {
		port: devPort,
		historyApiFallback: true,
		publicPath: `http://localhost:${devPort}/onboarding/`,
		contentBase: path.join(__dirname, 'dist'),
		inline: true,
		hot: true,
		stats: {
			colors: true,
			exclude: ['node_modules']
		},
		setup: proxyServer
	},
	plugins: [
		new webpack.DefinePlugin({
			DEV: true,
			DEBUG: true
		}),
		new webpack.HotModuleReplacementPlugin(),
		new webpack.LoaderOptionsPlugin({
			options: {
				eslint: {
					configFile: './.eslintrc',
					emitError: true,
					emitWarning: true
				},
				context: '/'
			}
		})
	]
});

module.exports = webpackDevConfig;