Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update dependency rollup to v3 #410

Merged
merged 2 commits into from
Nov 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
144 changes: 52 additions & 92 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
"jest": "^28.1.2",
"prettier": "^2.7.1",
"rimraf": "^3.0.2",
"rollup": "^2.75.7",
"rollup": "^3.2.5",
"rollup-plugin-commonjs": "^10.1.0",
"rollup-plugin-minification": "^0.2.0",
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-terser": "^7.0.2",
"textlint": "^12.1.1",
"textlint-rule-max-ten": "^4.0.3",
"textlint-rule-no-mix-dearu-desumasu": "^5.0.0",
Expand All @@ -38,7 +38,7 @@
"scripts": {
"prepare": "npm run build && npm run doc",
"build": "npm run clean && tsc -p ./ && npm run bundle && npm run format",
"bundle": "rollup -c rollup.config.js",
"bundle": "rollup -c rollup.config.js --bundleConfigAsCjs",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[!] RollupError: Node tried to load your configuration file as CommonJS even though it is likely an ES module. To resolve this, change the extension of your configuration to ".mjs", set "type": "module" in your package.json file or pass the "--bundleConfigAsCjs" flag.

ビルド時にこのようなエラーが出ていたので、configファイルをCommonJSとしてバンドルする--bundleConfigAsCjsオプションを追加しました。(これはv3以降に追加されたオプションなので、v3以前は指定しなくてもCommonJSとしてバンドルされていた?)

"clean": "rimraf dist && rimraf lib",
"test": "npm run test:jest && npm run lint",
"test:jest": "jest --config jest.config.js",
Expand Down
2 changes: 1 addition & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import resolve from "rollup-plugin-node-resolve";
import commonjs from "rollup-plugin-commonjs";
import { terser } from "rollup-plugin-terser";
import { terser } from "rollup-plugin-minification";
Copy link
Contributor

@dera- dera- Nov 9, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rollup-plugin-terserモジュールが起因でコンフリクトが発生していたので別のモジュールを使うように変更しました。この修正はこちらのissueを参考にしています。


export default [
{
Expand Down