Upgrade deps (#93)

This commit is contained in:
Gerard Brull 2020-11-02 19:17:06 +01:00 committed by GitHub
parent d0c619542d
commit 86226dfbe3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5634 additions and 6018 deletions

View File

@ -1,8 +1,8 @@
{ {
"presets": ["env"], "presets": ["@babel/preset-env"],
"plugins": [ "plugins": [
"transform-object-rest-spread", "@babel/plugin-proposal-object-rest-spread",
"transform-react-jsx", "@babel/plugin-transform-react-jsx",
"transform-object-assign" "@babel/plugin-transform-object-assign"
] ]
} }

11582
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -9,7 +9,8 @@
"main": "build/index.js", "main": "build/index.js",
"types": "build/index.d.ts", "types": "build/index.d.ts",
"dependencies": { "dependencies": {
"js-cookie": "^2.2.1" "js-cookie": "^2.2.1",
"prop-types": "^15.7.2"
}, },
"peerDependencies": { "peerDependencies": {
"react": "^16.13.1" "react": "^16.13.1"
@ -41,23 +42,22 @@
}, },
"homepage": "https://github.com/Mastermindzh/react-cookie-consent#readme", "homepage": "https://github.com/Mastermindzh/react-cookie-consent#readme",
"devDependencies": { "devDependencies": {
"@babel/cli": "^7.12.1",
"@babel/core": "^7.12.3",
"@babel/plugin-proposal-object-rest-spread": "^7.12.1",
"@babel/plugin-transform-object-assign": "^7.12.1",
"@babel/plugin-transform-react-jsx": "^7.12.1",
"@babel/preset-env": "^7.12.1",
"@mastermindzh/prettier-config": "^1.0.0", "@mastermindzh/prettier-config": "^1.0.0",
"@types/js-cookie": "^2.2.6", "@types/js-cookie": "^2.2.6",
"babel-cli": "^6.26.0", "babel-loader": "^8.1.0",
"babel-core": "^6.26.3", "copy-webpack-plugin": "^6.2.1",
"babel-loader": "^7.1.4", "husky": "^4.3.0",
"babel-plugin-transform-object-assign": "^6.22.0", "lint-staged": "^10.5.1",
"babel-plugin-transform-object-rest-spread": "^6.26.0", "prettier": "^2.1.2",
"babel-plugin-transform-react-jsx": "^6.24.1",
"babel-preset-env": "^1.7.0",
"babel-preset-es2015": "^6.24.1",
"babel-preset-stage-1": "^6.24.1",
"copy-webpack-plugin": "^4.6.0",
"husky": "^4.2.5",
"lint-staged": "^10.2.10",
"prettier": "^2.0.5",
"react": "^16.13.1", "react": "^16.13.1",
"webpack": "^2.6.1" "webpack": "^5.3.2",
"webpack-cli": "^4.1.0"
}, },
"prettier": "@mastermindzh/prettier-config", "prettier": "@mastermindzh/prettier-config",
"husky": { "husky": {

View File

@ -1,32 +1,30 @@
var path = require('path'); var path = require("path");
var CopyWebpackPlugin = require('copy-webpack-plugin'); var CopyWebpackPlugin = require("copy-webpack-plugin");
module.exports = { module.exports = {
entry: './src/index.js', entry: "./src/index.js",
output: { output: {
path: path.resolve(__dirname, 'build'), path: path.resolve(__dirname, "build"),
filename: 'index.js', 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. 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.
}, },
module: { module: {
rules: [ rules: [
{ {
test: /\.js$/, test: /\.js$/,
include: path.resolve(__dirname, 'src'), include: path.resolve(__dirname, "src"),
exclude: /(node_modules|bower_components|build)/, exclude: /(node_modules|bower_components|build)/,
use: { use: {
loader: 'babel-loader', loader: "babel-loader",
options: { options: {
presets: ['env'] presets: ["@babel/preset-env"],
} },
} },
} },
] ],
}, },
externals: { externals: {
'react': 'commonjs react' // this line is just to use the React dependency of our parent-testing-project instead of using our own React. react: "commonjs react", // this line is just to use the React dependency of our parent-testing-project instead of using our own React.
}, },
plugins: [ plugins: [new CopyWebpackPlugin({ patterns: [{ from: "src/index.d.ts", to: "index.d.ts" }] })],
new CopyWebpackPlugin([{ from: 'src/index.d.ts', to: 'index.d.ts' }])
]
}; };