<commit_before>var path = require('path');
var StringReplacePlugin = require("string-replace-webpack-plugin");


module.exports = {
	entry: './src/browser-extensions/pdfMake.js',
	output: {
		path: path.join(__dirname, './build'),
		filename: 'pdfmake.js',
		libraryTarget: 'umd'
	},
	resolve: {
		alias: {
			fs: path.join(__dirname, './src/browser-extensions/virtual-fs.js')
		}
	},
	module: {
		loaders: [
			{test: /\.json$/, loader: 'json'},
			{test: /pdfMake.js$/, loader: 'expose?pdfMake', include: [path.join(__dirname, './src/browser-extensions')]},
			{test: /pdfkit[\/\\]js[\/\\]mixins[\/\\]fonts.js$/, loader: StringReplacePlugin.replace({
					replacements: [
						{
							pattern: 'return this.font(\'Helvetica\');',
							replacement: function () {
								return '';
							}
						}
					]})
			},
			{test: /fontkit[\/\\]index.js$/, loader: StringReplacePlugin.replace({
					replacements: [
						{
							pattern: /fs\./g,
							replacement: function () {
								return 'require(\'fs\').';
							}
						}
					]})
			},
			{test: /readable-stream[\/\\]/, loader: StringReplacePlugin.replace({
					replacements: [
						{
							pattern: 'stream.read()',
							replacement: function () {
								return 'stream.read(9007199254740991)';
							}
						}
					]})
			}
		],
		postLoaders: [
			{test: /fontkit[\/\\]/, loader: "transform?brfs"},
			{test: /unicode-properties[\/\\]/, loader: "transform?brfs"}
		]
	},
	plugins: [
		new StringReplacePlugin()
	]
};<commit_msg>Fix for issue #784<commit_after>var path = require('path');
var StringReplacePlugin = require("string-replace-webpack-plugin");


module.exports = {
	entry: './src/browser-extensions/pdfMake.js',
	output: {
		path: path.join(__dirname, './build'),
		filename: 'pdfmake.js',
		libraryTarget: 'umd'
	},
	resolve: {
		alias: {
			fs: path.join(__dirname, './src/browser-extensions/virtual-fs.js')
		}
	},
	module: {
		loaders: [
			{test: /\.json$/, loader: 'json'},
			{test: /pdfMake.js$/, loader: 'expose?pdfMake', include: [path.join(__dirname, './src/browser-extensions')]},
			{test: /pdfkit[\/\\]js[\/\\]mixins[\/\\]fonts.js$/, loader: StringReplacePlugin.replace({
					replacements: [
						{
							pattern: 'return this.font(\'Helvetica\');',
							replacement: function () {
								return '';
							}
						}
					]})
			},
			{test: /fontkit[\/\\]index.js$/, loader: StringReplacePlugin.replace({
					replacements: [
						{
							pattern: /fs\./g,
							replacement: function () {
								return 'require(\'fs\').';
							}
						}
					]})
			},
			{test: /readable-stream[\/\\]/, loader: StringReplacePlugin.replace({
					replacements: [
						{
							pattern: 'stream.read()',
							replacement: function () {
								return 'stream.read(9007199254740991)';
							}
						}
					]})
			},
			/* hack for IE 10 */
			{test: /brotli[\/\\]dec[\/\\]/, loader: StringReplacePlugin.replace({
					replacements: [
						{
							pattern: /const /g,
							replacement: function () {
								return 'var ';
							}
						}
					]})
			}
		],
		postLoaders: [
			{test: /fontkit[\/\\]/, loader: "transform?brfs"},
			{test: /unicode-properties[\/\\]/, loader: "transform?brfs"}
		]
	},
	plugins: [
		new StringReplacePlugin()
	]
};
{'fraction_non_alphanumeric': 0.20714065866420436, 'fraction_numerical': 0.01138811942136042, 'mean_word_length': 2.3574380165289255, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '1022937', 'n_tokens_mistral': 1528, 'n_tokens_neox': 1109, 'n_words': 179}