chore(rollup): use new plugins
This commit is contained in:
4
.babelrc
4
.babelrc
@@ -8,5 +8,5 @@
|
||||
],
|
||||
"@babel/preset-react"
|
||||
],
|
||||
"plugins": []
|
||||
}
|
||||
"plugins": ["@babel/plugin-transform-runtime"]
|
||||
}
|
||||
|
||||
15
package.json
15
package.json
@@ -23,10 +23,10 @@
|
||||
"test:firefox": "cypress run --browser firefox",
|
||||
"test:all": "npm run test:chrome && npm run test:firefox",
|
||||
"test": "npm run dev:wait test:chrome",
|
||||
"release": "release-it",
|
||||
"postinstall": "cd example && npm install"
|
||||
"release": "release-it"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.9.0",
|
||||
"@welldone-software/why-did-you-render": "^4.3.2",
|
||||
"classcat": "^4.1.0",
|
||||
"d3-selection": "^2.0.0",
|
||||
@@ -38,8 +38,13 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.12.3",
|
||||
"@babel/plugin-transform-runtime": "^7.9.0",
|
||||
"@babel/preset-env": "^7.12.1",
|
||||
"@babel/preset-react": "^7.12.1",
|
||||
"@rollup/plugin-babel": "^5.2.1",
|
||||
"@rollup/plugin-commonjs": "^15.1.0",
|
||||
"@rollup/plugin-node-resolve": "^9.0.0",
|
||||
"@rollup/plugin-replace": "^2.3.3",
|
||||
"@svgr/rollup": "^5.4.0",
|
||||
"@types/classnames": "^2.2.10",
|
||||
"@types/d3": "^5.16.3",
|
||||
@@ -53,13 +58,9 @@
|
||||
"prop-types": "^15.7.2",
|
||||
"react": "^16.14.0",
|
||||
"release-it": "^14.2.0",
|
||||
"rollup": "^2.32.0",
|
||||
"rollup-plugin-babel": "^4.4.0",
|
||||
"rollup": "^2.28.2",
|
||||
"rollup-plugin-bundle-size": "^1.0.3",
|
||||
"rollup-plugin-commonjs": "^10.1.0",
|
||||
"rollup-plugin-node-resolve": "^5.2.0",
|
||||
"rollup-plugin-postcss": "^3.1.8",
|
||||
"rollup-plugin-replace": "^2.2.0",
|
||||
"rollup-plugin-typescript2": "^0.28.0",
|
||||
"start-server-and-test": "^1.11.5",
|
||||
"typescript": "^4.0.3"
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import resolve from 'rollup-plugin-node-resolve';
|
||||
import commonjs from 'rollup-plugin-commonjs';
|
||||
import babel from 'rollup-plugin-babel';
|
||||
import resolve from '@rollup/plugin-node-resolve';
|
||||
import commonjs from '@rollup/plugin-commonjs';
|
||||
import babel from '@rollup/plugin-babel';
|
||||
import postcss from 'rollup-plugin-postcss';
|
||||
import bundleSize from 'rollup-plugin-bundle-size';
|
||||
import replace from 'rollup-plugin-replace';
|
||||
import replace from '@rollup/plugin-replace';
|
||||
import svgr from '@svgr/rollup';
|
||||
import typescript from 'rollup-plugin-typescript2';
|
||||
|
||||
@@ -15,7 +15,7 @@ const processEnv = isProd ? 'production' : 'development';
|
||||
export default [
|
||||
{
|
||||
input: 'src/index.ts',
|
||||
external: ['react', 'react-dom'],
|
||||
external: ['react', 'react-dom', /@babel\/runtime/],
|
||||
onwarn(warning, rollupWarn) {
|
||||
if (warning.code !== 'CIRCULAR_DEPENDENCY') {
|
||||
rollupWarn(warning);
|
||||
@@ -42,6 +42,7 @@ export default [
|
||||
}),
|
||||
babel({
|
||||
exclude: 'node_modules/**',
|
||||
babelHelpers: 'runtime',
|
||||
}),
|
||||
replace({
|
||||
'process.env.NODE_ENV': JSON.stringify(processEnv),
|
||||
|
||||
Reference in New Issue
Block a user