<NME> webpack.config.js
<BEF> var ProvidePlugin = require("../../../../").ProvidePlugin;
/** @type {import("../../../../").Configuration} */
module.exports = {
	plugins: [
		new ProvidePlugin({
			aaa: "./aaa",
			"bbb.ccc": "./bbbccc",
			dddeeefff: ["./ddd", "eee", "3-f"],
			es2015: "./harmony",
			es2015_name: ["./harmony", "default"],
			es2015_alias: ["./harmony", "alias"],
			es2015_year: ["./harmony", "year"]
		})
	]
};
			esm: "./esm.js"
		})
	]
};

<MSG> Merge pull request #6588 from nveenjain/fix/ParserProvidPlugin

Fixed Parser so that this Expression can work with ProvidePlugin
<DFF> @@ -9,7 +9,8 @@ module.exports = {
 			es2015: "./harmony",
 			es2015_name: ["./harmony", "default"],
 			es2015_alias: ["./harmony", "alias"],
-			es2015_year: ["./harmony", "year"]
+			es2015_year: ["./harmony", "year"],
+			"this.aaa": "./aaa"
 		})
 	]
 };

{'commit': 'diff --git a/lib/Parser.js b/lib/Parser.js\nindex 7ca4d5426..30c7f4b81 100644\n--- a/lib/Parser.js\n+++ b/lib/Parser.js\n@@ -2008,7 +2008,7 @@ class Parser extends Tapable {\n \t\t\tfree = true;\n \t\t\texprName.push(this.scope.renames.get("this"));\n \t\t} else if (expr.type === "ThisExpression") {\n-\t\t\tfree = false;\n+\t\t\tfree = this.scope.topLevelScope;\n \t\t\texprName.push("this");\n \t\t} else {\n \t\t\treturn null;\ndiff --git a/test/configCases/plugins/provide-plugin/index.js b/test/configCases/plugins/provide-plugin/index.js\nindex 5f1c9a45d..7bfad58c0 100644\n--- a/test/configCases/plugins/provide-plugin/index.js\n+++ b/test/configCases/plugins/provide-plugin/index.js\n@@ -16,6 +16,10 @@ it("should provide a module for a nested var within a IIFE\'s argument", function\n \t}(process));\n });\n \n+it("should provide a module for thisExpression", () => {\n+\t(this.aaa).should.be.eql("aaa");\n+});\n+\n it("should provide a module for a nested var within a IIFE\'s this", function() {\n \t(function() {\n \t\t(this.env.NODE_ENV).should.be.eql("development");\ndiff --git a/test/configCases/plugins/provide-plugin/webpack.config.js b/test/configCases/plugins/provide-plugin/webpack.config.js\nindex cba942cab..05b97a8af 100644\n--- a/test/configCases/plugins/provide-plugin/webpack.config.js\n+++ b/test/configCases/plugins/provide-plugin/webpack.config.js\n@@ -9,7 +9,8 @@ module.exports = {\n \t\t\tes2015: "./harmony",\n \t\t\tes2015_name: ["./harmony", "default"],\n \t\t\tes2015_alias: ["./harmony", "alias"],\n-\t\t\tes2015_year: ["./harmony", "year"]\n+\t\t\tes2015_year: ["./harmony", "year"],\n+\t\t\t"this.aaa": "./aaa"\n \t\t})\n \t]\n };\n', 'commit_subject': 'Merge pull request #6588 from nveenjain/fix/ParserProvidPlugin', 'repo_name': 'webpack/webpack', 'committer': {'name': 'GitHub', 'email': '1505422b2465e9a84f6fdfaa161078890c593f06@github.com', 'time_sec': '1519717699', 'tz_offset': '60', 'date': {'seconds': '1519717699'}}, 'commit_tree': 'cb8cf0a2aad7500509793f7b7e051f5d5793c937', 'commit_message': 'Merge pull request #6588 from nveenjain/fix/ParserProvidPlugin\n\nFixed Parser so that this Expression can work with ProvidePlugin', 'language_name': 'HTML', 'license': 'mit', 'hunks': '@@ -9,7 +9,8 @@ module.exports = {\n \t\t\tes2015: "./harmony",\n \t\t\tes2015_name: ["./harmony", "default"],\n \t\t\tes2015_alias: ["./harmony", "alias"],\n-\t\t\tes2015_year: ["./harmony", "year"]\n+\t\t\tes2015_year: ["./harmony", "year"],\n+\t\t\t"this.aaa": "./aaa"\n \t\t})\n \t]\n };\n', 'addition_count': 2, 'deletion_count': 1, 'src_file': 'a/test/configCases/plugins/provide-plugin/webpack.config.js', 'tgt_file': 'b/test/configCases/plugins/provide-plugin/webpack.config.js', 'file_extension': '.js', 'before_file': 'var ProvidePlugin = require("../../../../").ProvidePlugin;\n/** @type {import("../../../../").Configuration} */\nmodule.exports = {\n\tplugins: [\n\t\tnew ProvidePlugin({\n\t\t\taaa: "./aaa",\n\t\t\t"bbb.ccc": "./bbbccc",\n\t\t\tdddeeefff: ["./ddd", "eee", "3-f"],\n\t\t\tes2015: "./harmony",\n\t\t\tes2015_name: ["./harmony", "default"],\n\t\t\tes2015_alias: ["./harmony", "alias"],\n\t\t\tes2015_year: ["./harmony", "year"]\n\t\t})\n\t]\n};\n\t\t\tesm: "./esm.js"\n\t\t})\n\t]\n};\n', 'message': 'Merge pull request #6588 from nveenjain/fix/ParserProvidPlugin\n\nFixed Parser so that this Expression can work with ProvidePlugin', 'author_name': 'GitHub', 'lang': 'config'}