diff --git a/CHANGELOG.md b/CHANGELOG.md index 6bd5b07..e1b0f82 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [[7.0.0](https://github.com/Mastermindzh/react-cookie-consent/releases/tag/6.4.1)] +## [[7.0.1](https://github.com/Mastermindzh/react-cookie-consent/releases/tag/7.0.1)] + +- Configured webpack to remove self from build artefact. Should now work in Nextjs and Gatsby (only tested those..) + +## [[7.0.0](https://github.com/Mastermindzh/react-cookie-consent/releases/tag/7.0.0)] - Switched from CommonJS to UMD module diff --git a/build/index.js b/build/index.js index 0137be6..9aa96f7 100644 --- a/build/index.js +++ b/build/index.js @@ -7,7 +7,7 @@ : "object" == typeof exports ? (exports.ReactCookieConsent = t()) : (e.ReactCookieConsent = t()); -})(self, function () { +})("undefined" != typeof self ? self : this, function () { return (function () { var e = { 808: function (e, t, n) { diff --git a/package-lock.json b/package-lock.json index b58cfbd..26aa2ba 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { "name": "react-cookie-consent", - "version": "7.0.0", + "version": "7.0.1", "lockfileVersion": 2, "requires": true, "packages": { "": { - "version": "7.0.0", + "version": "7.0.1", "license": "MIT", "dependencies": { "js-cookie": "^2.2.1", diff --git a/package.json b/package.json index 03e9db7..a842961 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "name": "Rick van Lieshout", "email": "info@rickvanlieshout.com" }, - "version": "7.0.0", + "version": "7.0.1", "description": "A small, simple and customizable cookie consent bar for use in React applications.", "main": "build/index.js", "types": "build/index.d.ts", diff --git a/webpack.config.js b/webpack.config.js index f34d3ab..f083588 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -13,6 +13,7 @@ module.exports = { environment: { arrowFunction: false, // the generated runtime-code should not use arrow functions }, + globalObject: `typeof self !== 'undefined' ? self : this`, }, module: { rules: [