<commit_before>const path = require('path');

module.exports = ({ getUserConfig }) => {
	const plugins = [];
	if (getUserConfig('cmf') !== false) {
		// eslint-disable-next-line global-require,import/newline-after-import
		const ReactCMFWebpackPlugin = require('@talend/react-cmf-webpack-plugin');
		plugins.push(new ReactCMFWebpackPlugin({ watch: true }));
	}

	return {
		mode: 'development',
		module: {
			rules: [{
				test:	/.*\.js$/,
				enforce: 'pre',
				loader: 'eslint-loader',
				exclude: /node_modules/,
				options: { configFile: path.resolve(__dirname, '.eslintrc') },
			}],
		},
		watchOptions: {
			aggregateTimeout: 300,
			poll: 1000,
		},
		devServer: {
			port: 3000,
			proxy: {
				'/api': {
					target: getUserConfig(['webpack', 'api-url'], 'http://localhost'),
					changeOrigin: true,
					secure: false,
				},
			},
			stats: 'errors-only',
			historyApiFallback: true,
			contentBase: path.join(process.cwd(), '/dist'),
		},
		plugins,
	};
};<commit_msg>feat(Scripts): set source-map to map original files, not eval (#1362)<commit_after>const path = require('path');

module.exports = ({ getUserConfig }) => {
	const plugins = [];
	if (getUserConfig('cmf') !== false) {
		// eslint-disable-next-line global-require,import/newline-after-import
		const ReactCMFWebpackPlugin = require('@talend/react-cmf-webpack-plugin');
		plugins.push(new ReactCMFWebpackPlugin({ watch: true }));
	}

	return {
		mode: 'development',
		module: {
			rules: [{
				test:	/.*\.js$/,
				enforce: 'pre',
				loader: 'eslint-loader',
				exclude: /node_modules/,
				options: { configFile: path.resolve(__dirname, '.eslintrc') },
			}],
		},
		watchOptions: {
			aggregateTimeout: 300,
			poll: 1000,
		},
		devServer: {
			port: 3000,
			proxy: {
				'/api': {
					target: getUserConfig(['webpack', 'api-url'], 'http://localhost'),
					changeOrigin: true,
					secure: false,
				},
			},
			stats: 'errors-only',
			historyApiFallback: true,
			contentBase: path.join(process.cwd(), '/dist'),
		},
		plugins,
		devtool: 'source-map',
	};
};
{'fraction_non_alphanumeric': 0.18442822384428223, 'fraction_numerical': 0.012652068126520682, 'mean_word_length': 3.374468085106383, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5031073', 'n_tokens_mistral': 870, 'n_tokens_neox': 702, 'n_words': 135}