mirror of
				https://github.com/Mastermindzh/react-cookie-consent.git
				synced 2025-11-04 02:38:50 +01:00 
			
		
		
		
	Switch Library Type from CommonJs2 => UMD ( (#135)
Co-authored-by: Peter Krieg <pkrieg2@gmail.com>
This commit is contained in:
		@@ -5,6 +5,10 @@ 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)]
 | 
			
		||||
 | 
			
		||||
- Switched from CommonJS to UMD module
 | 
			
		||||
 | 
			
		||||
## [[6.4.1](https://github.com/Mastermindzh/react-cookie-consent/releases/tag/6.4.1))]
 | 
			
		||||
 | 
			
		||||
- Added missing typing
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										1447
									
								
								build/index.js
									
									
									
									
									
								
							
							
						
						
									
										1447
									
								
								build/index.js
									
									
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										4
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										4
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							@@ -1,11 +1,11 @@
 | 
			
		||||
{
 | 
			
		||||
  "name": "react-cookie-consent",
 | 
			
		||||
  "version": "6.4.1",
 | 
			
		||||
  "version": "7.0.0",
 | 
			
		||||
  "lockfileVersion": 2,
 | 
			
		||||
  "requires": true,
 | 
			
		||||
  "packages": {
 | 
			
		||||
    "": {
 | 
			
		||||
      "version": "6.4.1",
 | 
			
		||||
      "version": "7.0.0",
 | 
			
		||||
      "license": "MIT",
 | 
			
		||||
      "dependencies": {
 | 
			
		||||
        "js-cookie": "^2.2.1",
 | 
			
		||||
 
 | 
			
		||||
@@ -4,7 +4,7 @@
 | 
			
		||||
    "name": "Rick van Lieshout",
 | 
			
		||||
    "email": "info@rickvanlieshout.com"
 | 
			
		||||
  },
 | 
			
		||||
  "version": "6.4.1",
 | 
			
		||||
  "version": "7.0.0",
 | 
			
		||||
  "description": "A small, simple and customizable cookie consent bar for use in React applications.",
 | 
			
		||||
  "main": "build/index.js",
 | 
			
		||||
  "types": "build/index.d.ts",
 | 
			
		||||
 
 | 
			
		||||
@@ -6,7 +6,10 @@ module.exports = {
 | 
			
		||||
  output: {
 | 
			
		||||
    path: path.resolve(__dirname, "build"),
 | 
			
		||||
    filename: "index.js",
 | 
			
		||||
    libraryTarget: "commonjs2", // THIS IS THE MOST IMPORTANT LINE! :mindblow: I wasted more than 2 days until realize this was the line most important in all this guide.
 | 
			
		||||
    library: {
 | 
			
		||||
      name: "ReactCookieConsent",
 | 
			
		||||
      type: "umd",
 | 
			
		||||
    },
 | 
			
		||||
    environment: {
 | 
			
		||||
      arrowFunction: false, // the generated runtime-code should not use arrow functions
 | 
			
		||||
    },
 | 
			
		||||
@@ -16,7 +19,7 @@ module.exports = {
 | 
			
		||||
      {
 | 
			
		||||
        test: /\.js$/,
 | 
			
		||||
        include: path.resolve(__dirname, "src"),
 | 
			
		||||
        exclude: /(node_modules|bower_components|build)/,
 | 
			
		||||
        exclude: /(node_modules|build)/,
 | 
			
		||||
        use: {
 | 
			
		||||
          loader: "babel-loader",
 | 
			
		||||
          options: {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user