react-screentype-hook
Advanced tools
@@ -11,3 +11,3 @@ module.exports = { | ||
], | ||
plugins: ['styled-components', '@babel/plugin-proposal-class-properties', '@babel/plugin-syntax-dynamic-import'], | ||
plugins: [ '@babel/plugin-syntax-dynamic-import'], | ||
env: { | ||
@@ -17,20 +17,10 @@ production: { | ||
plugins: [ | ||
'lodash', | ||
'transform-react-remove-prop-types', | ||
'@babel/plugin-transform-react-inline-elements', | ||
'@babel/plugin-transform-react-constant-elements', | ||
['import', { libraryName: 'antd', style: 'css' }] | ||
'@babel/plugin-transform-react-constant-elements' | ||
] | ||
}, | ||
dev: { | ||
plugins: [['import', { libraryName: 'antd', style: 'css' }]] | ||
}, | ||
development: { | ||
plugins: [['import', { libraryName: 'antd', style: 'css' }]] | ||
}, | ||
test: { | ||
plugins: [ | ||
'@babel/plugin-transform-modules-commonjs', | ||
'dynamic-import-node', | ||
['import', { libraryName: 'antd', style: 'css' }] | ||
'dynamic-import-node' | ||
] | ||
@@ -37,0 +27,0 @@ } |
{ | ||
"name": "react-screentype-hook", | ||
"version": "1.0.14", | ||
"version": "1.0.15", | ||
"sideEffects": false, | ||
"description": "react-screentype-hook", | ||
@@ -52,15 +53,3 @@ "repository": { | ||
"pre-commit": "lint:staged", | ||
"resolutions": { | ||
"babel-core": "7.0.0-bridge.0" | ||
}, | ||
"dependencies": { | ||
"@babel/plugin-proposal-class-properties": "^7.8.3", | ||
"@babel/plugin-syntax-dynamic-import": "^7.8.3", | ||
"@babel/polyfill": "^7.8.7", | ||
"@babel/preset-env": "^7.9.6", | ||
"@babel/preset-react": "^7.9.4", | ||
"babel-plugin-import": "^1.13.0", | ||
"babel-plugin-styled-components": "^1.10.7", | ||
"prop-types": "^15.7.2" | ||
}, | ||
"dependencies": {}, | ||
"peerDependencies": { | ||
@@ -71,4 +60,7 @@ "react": "^16.8.6", | ||
"devDependencies": { | ||
"@babel/core": "7.4.3", | ||
"babel-loader": "8.0.5", | ||
"@babel/core": "^7.10.2", | ||
"@babel/preset-env": "^7.10.2", | ||
"@babel/preset-react": "^7.10.1", | ||
"babel-loader": "^8.1.0", | ||
"babel-plugin-import": "^1.13.0", | ||
"coveralls": "3.0.3", | ||
@@ -75,0 +67,0 @@ "eslint": "5.16.0", |
@@ -1,2 +0,1 @@ | ||
import "@babel/polyfill" | ||
export { default } from "./useScreenType"; |
import { useState, useEffect } from "react"; | ||
import { PropTypes } from "prop-types"; | ||
import { | ||
@@ -4,0 +3,0 @@ getCurrentScreenType, |
const path = require('path'); | ||
const webpack = require('webpack'); | ||
const TerserPlugin = require('terser-webpack-plugin'); | ||
module.exports = { | ||
@@ -25,8 +24,2 @@ entry: './src/index.js', | ||
externals: { | ||
lodash: { | ||
commonjs: 'lodash', | ||
commonjs2: 'lodash', | ||
amd: 'lodash', | ||
root: '_' | ||
}, | ||
react: { | ||
@@ -40,2 +33,4 @@ commonjs: 'react', | ||
optimization: { | ||
usedExports: true, | ||
providedExports: true, | ||
minimizer: [ | ||
@@ -42,0 +37,0 @@ new TerserPlugin({ |
Sorry, the diff of this file is too big to display
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
2
-80%0
-100%27353
-76.57%14
27.27%158
-9.2%