react-remote-resource
Advanced tools
Comparing version 0.2.2 to 0.2.3
{ | ||
"name": "react-remote-resource", | ||
"version": "0.2.2", | ||
"version": "0.2.3", | ||
"description": "Intuitive remote data management in React", | ||
"main": "dist/cjs.js", | ||
"main": "dist/index.cjs.js", | ||
"module": "dist/index.js", | ||
"repository": "https://github.com/chadwatson/react-remote-resource", | ||
@@ -17,3 +18,2 @@ "author": "Chad Watson <chadwatsn@gmail.com>", | ||
"immutable": "^4.0.0-rc.12", | ||
"prop-types": "^15.7.2", | ||
"redux": "^4.0.1" | ||
@@ -23,2 +23,3 @@ }, | ||
"@babel/core": "^7.4.0", | ||
"@babel/plugin-proposal-class-properties": "^7.4.0", | ||
"@babel/preset-env": "^7.4.1", | ||
@@ -28,2 +29,3 @@ "@babel/preset-react": "^7.0.0", | ||
"babel-jest": "^24.5.0", | ||
"babel-plugin-transform-react-remove-prop-types": "^0.4.24", | ||
"eslint": "^5.14.0", | ||
@@ -46,6 +48,7 @@ "eslint-config-prettier": "^4.0.0", | ||
"rollup-plugin-babel": "^4.3.2", | ||
"rollup-plugin-peer-deps-external": "^2.2.0", | ||
"rollup-plugin-uglify": "^6.0.2" | ||
"rollup-plugin-node-resolve": "^4.0.1", | ||
"rollup-plugin-size-snapshot": "^0.8.0" | ||
}, | ||
"peerDependencies": { | ||
"prop-types": "15.x.x", | ||
"react": ">= 16.7.0-alpha.2", | ||
@@ -52,0 +55,0 @@ "react-dom": ">= 16.7.0-alpha.2" |
@@ -0,23 +1,51 @@ | ||
import path from "path"; | ||
import babel from "rollup-plugin-babel"; | ||
import { uglify } from "rollup-plugin-uglify"; | ||
import peerDepsExternal from "rollup-plugin-peer-deps-external"; | ||
import resolve from "rollup-plugin-node-resolve"; | ||
import { sizeSnapshot } from "rollup-plugin-size-snapshot"; | ||
export default { | ||
input: "src/index.js", | ||
output: { | ||
file: "dist/cjs.js", | ||
format: "cjs" | ||
}, | ||
const root = process.platform === "win32" ? path.resolve("/") : "/"; | ||
const external = id => !id.startsWith(".") && !id.startsWith(root); | ||
const extensions = [".js"]; | ||
const getBabelOptions = ({ useESModules }, targets) => ({ | ||
babelrc: false, | ||
extensions, | ||
exclude: "**/node_modules/**", | ||
runtimeHelpers: true, | ||
presets: [ | ||
["@babel/preset-env", { loose: true, modules: false, targets }], | ||
"@babel/preset-react" | ||
], | ||
plugins: [ | ||
peerDepsExternal(), | ||
babel({ | ||
exclude: "node_modules/**", | ||
babelrc: false, | ||
presets: [ | ||
["@babel/preset-env", { modules: false }], | ||
"@babel/preset-react" | ||
] | ||
}), | ||
uglify() | ||
["@babel/proposal-class-properties", { loose: true }], | ||
["@babel/plugin-proposal-object-rest-spread", { loose: true }], | ||
["transform-react-remove-prop-types", { removeImport: true }] | ||
] | ||
}; | ||
}); | ||
export default [ | ||
{ | ||
input: "./src/index.js", | ||
output: { file: "dist/index.js", format: "esm" }, | ||
external, | ||
plugins: [ | ||
babel( | ||
getBabelOptions( | ||
{ useESModules: true }, | ||
">1%, not dead, not ie 11, not op_mini all" | ||
) | ||
), | ||
sizeSnapshot(), | ||
resolve({ extensions }) | ||
] | ||
}, | ||
{ | ||
input: `./src/index.js`, | ||
output: { file: `dist/index.cjs.js`, format: "cjs" }, | ||
external, | ||
plugins: [ | ||
babel(getBabelOptions({ useESModules: false })), | ||
sizeSnapshot(), | ||
resolve({ extensions }) | ||
] | ||
} | ||
]; |
Sorry, the diff of this file is not supported yet
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
335917
30
1432
2
26
- Removedprop-types@^15.7.2