Skip to content

Commit

Permalink
fix: update rollup and rollup config (#2969)
Browse files Browse the repository at this point in the history
Update rollup and rollup config
move rollup config to .mjs file
fix ignore path for eslint

---------

Co-authored-by: Gavin Barron <[email protected]>
  • Loading branch information
musale and gavinbarron authored Jan 29, 2024
1 parent 00fe946 commit 606fffb
Show file tree
Hide file tree
Showing 139 changed files with 345 additions and 1,244 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ module.exports = {
},
plugins: ['eslint-plugin-jsdoc', 'eslint-plugin-prefer-arrow', 'eslint-plugin-react', '@typescript-eslint'],
root: true,
ignorePatterns: ['**/**-css.ts', '.eslintrc.js', '*.cjs'],
ignorePatterns: ['**/**-css.ts', '.eslintrc.js', '*.cjs', 'rollup.config.mjs'],
rules: {
'@typescript-eslint/no-explicit-any': 'warn',
// prefer-nullish-coalescing requires strictNullChecking to be turned on
Expand Down
8 changes: 4 additions & 4 deletions .storybook/rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import resolve from 'rollup-plugin-node-resolve';
import babel from 'rollup-plugin-babel';
import { babel } from '@rollup/plugin-babel';
import nodeResolve from '@rollup/plugin-node-resolve';
import terser from '@rollup/plugin-terser';
import postcss from 'rollup-plugin-postcss';
import { terser } from 'rollup-plugin-terser';

const extensions = ['.js'];

Expand Down Expand Up @@ -34,7 +34,7 @@ const es6Bundle = {
extensions,
...getBabelConfig(false)
}),
resolve({ module: true, jsnext: true, extensions }),
nodeResolve({ mainFields: ['module', 'jsnext'], extensions }),
postcss(),
terser({ keep_classnames: true, keep_fnames: true })
]
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/has-npm-1.0.4-0dc267d5e0-8a11ba062e.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/uniq-npm-1.0.1-5cab2dd0f3-8206535f83.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
17 changes: 8 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@
"@octokit/rest": "^18.5.3",
"@open-wc/testing": "^3.2.0",
"@open-wc/testing-helpers": "^2.3.0",
"@rollup/plugin-babel": "^6.0.4",
"@rollup/plugin-commonjs": "^25.0.7",
"@rollup/plugin-json": "^6.1.0",
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-terser": "^0.4.4",
"@rollup/plugin-typescript": "^11.1.6",
"@stackblitz/sdk": "^1.9.0",
"@storybook/addon-a11y": "^7.6.7",
"@storybook/addon-actions": "^7.6.7",
Expand Down Expand Up @@ -129,15 +135,8 @@
"react": "^17.0.1",
"react-dom": "^17.0.1",
"regenerator-runtime": "^0.13.7",
"rollup": "2.46.0",
"rollup-plugin-babel": "^4.4.0",
"rollup-plugin-babel-minify": "^10.0.0",
"rollup-plugin-commonjs": "^10.1.0",
"rollup-plugin-json": "^4.0.0",
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-postcss": "^3.1.8",
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-typescript": "^1.0.1",
"rollup": "^4.9.6",
"rollup-plugin-postcss": "^4.0.2",
"sass": "^1.29.0",
"shx": "^0.3.3",
"sinon": "^16.1.0",
Expand Down
16 changes: 8 additions & 8 deletions packages/mgt/rollup.config.js → packages/mgt/rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import resolve from 'rollup-plugin-node-resolve';
import babel from 'rollup-plugin-babel';
import commonjs from 'rollup-plugin-commonjs';
import { babel } from '@rollup/plugin-babel';
import json from '@rollup/plugin-json';
import nodeResolve from '@rollup/plugin-node-resolve';
import terser from '@rollup/plugin-terser';
import commonjs from '@rollup/plugin-commonjs';
import postcss from 'rollup-plugin-postcss';
import { terser } from 'rollup-plugin-terser';
import json from 'rollup-plugin-json';

const extensions = ['.js', '.ts'];

Expand All @@ -27,7 +27,7 @@ const getBabelConfig = () => {
const commonPlugins = [
json(),
commonjs(),
resolve({ module: true, jsnext: true, extensions }),
nodeResolve({ mainFields: ['module', 'jsnext'], extensions }),
postcss(),
terser({ keep_classnames: true, keep_fnames: true })
];
Expand All @@ -41,6 +41,7 @@ const es6Bundle = {
sourcemap: false
},
plugins: [
...commonPlugins,
babel({
extensions,
presets: [
Expand All @@ -53,8 +54,7 @@ const es6Bundle = {
'@babel/typescript'
],
...getBabelConfig()
}),
...commonPlugins
})
]
};

Expand Down
Loading

0 comments on commit 606fffb

Please sign in to comment.