From 7983dc0b6fbbbe05eb46b5c584463947ead4ebca Mon Sep 17 00:00:00 2001 From: Zimtir Date: Sat, 2 Apr 2022 02:01:59 +0300 Subject: [PATCH] feat: resolve rollup commonjs --- .gitignore | 1 + package-lock.json | 51 +++++++++++++++++++++++++++++++++++++++++++++++ package.json | 2 +- rollup.config.js | 2 +- 4 files changed, 54 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 0ca39c0..0283f48 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ node_modules dist .DS_Store +.eslintcache diff --git a/package-lock.json b/package-lock.json index 7aff448..d87fb9e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -93,6 +93,7 @@ "@babel/preset-typescript": "^7.16.7", "@commitlint/cli": "^16.2.3", "@commitlint/config-conventional": "^16.2.1", + "@rollup/plugin-commonjs": "^21.0.3", "@storybook/addon-actions": "^6.4.19", "@storybook/addon-essentials": "^6.4.19", "@storybook/addon-interactions": "^6.4.19", @@ -3920,6 +3921,33 @@ } } }, + "node_modules/@rollup/plugin-commonjs": { + "version": "21.0.3", + "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-21.0.3.tgz", + "integrity": "sha512-ThGfwyvcLc6cfP/MWxA5ACF+LZCvsuhUq7V5134Az1oQWsiC7lNpLT4mJI86WQunK7BYmpUiHmMk2Op6OAHs0g==", + "dev": true, + "dependencies": { + "@rollup/pluginutils": "^3.1.0", + "commondir": "^1.0.1", + "estree-walker": "^2.0.1", + "glob": "^7.1.6", + "is-reference": "^1.2.1", + "magic-string": "^0.25.7", + "resolve": "^1.17.0" + }, + "engines": { + "node": ">= 8.0.0" + }, + "peerDependencies": { + "rollup": "^2.38.3" + } + }, + "node_modules/@rollup/plugin-commonjs/node_modules/estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", + "dev": true + }, "node_modules/@rollup/plugin-node-resolve": { "version": "11.2.1", "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-11.2.1.tgz", @@ -50430,6 +50458,29 @@ "@rollup/pluginutils": "^3.1.0" } }, + "@rollup/plugin-commonjs": { + "version": "21.0.3", + "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-21.0.3.tgz", + "integrity": "sha512-ThGfwyvcLc6cfP/MWxA5ACF+LZCvsuhUq7V5134Az1oQWsiC7lNpLT4mJI86WQunK7BYmpUiHmMk2Op6OAHs0g==", + "dev": true, + "requires": { + "@rollup/pluginutils": "^3.1.0", + "commondir": "^1.0.1", + "estree-walker": "^2.0.1", + "glob": "^7.1.6", + "is-reference": "^1.2.1", + "magic-string": "^0.25.7", + "resolve": "^1.17.0" + }, + "dependencies": { + "estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", + "dev": true + } + } + }, "@rollup/plugin-node-resolve": { "version": "11.2.1", "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-11.2.1.tgz", diff --git a/package.json b/package.json index be5410f..de7abaf 100644 --- a/package.json +++ b/package.json @@ -164,6 +164,7 @@ "@babel/preset-typescript": "^7.16.7", "@commitlint/cli": "^16.2.3", "@commitlint/config-conventional": "^16.2.1", + "@rollup/plugin-commonjs": "^21.0.3", "@storybook/addon-actions": "^6.4.19", "@storybook/addon-essentials": "^6.4.19", "@storybook/addon-interactions": "^6.4.19", @@ -326,7 +327,6 @@ "npm run stylelint:css:fix", "git add" ], - "*.js": "eslint --cache --fix", "*.{js,css,md}": "prettier --write" } } diff --git a/rollup.config.js b/rollup.config.js index de0c637..58cffb3 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -1,5 +1,5 @@ import typescript from 'rollup-plugin-typescript2' -import commonjs from 'rollup-plugin-commonjs' +import commonjs from '@rollup/plugin-commonjs' import external from 'rollup-plugin-peer-deps-external' import postcss from 'rollup-plugin-postcss' import resolve from 'rollup-plugin-node-resolve'