Skip to content

Commit

Permalink
fix: rollup process warning
Browse files Browse the repository at this point in the history
  • Loading branch information
mskian committed May 21, 2023
1 parent 577daf5 commit c2eb93e
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 6 deletions.
1 change: 1 addition & 0 deletions lib/maker.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ function postData(event) {
});
}
}

if ('serviceWorker' in navigator) {
window.addEventListener('load', function () {
navigator.serviceWorker
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"@rollup/plugin-commonjs": "^25.0.0",
"@rollup/plugin-json": "^6.0.0",
"@rollup/plugin-node-resolve": "^15.0.2",
"@rollup/plugin-replace": "^5.0.2",
"@tailwindcss/forms": "^0.5.3",
"autoprefixer": "^10.4.14",
"eslint": "^8.40.0",
Expand Down
2 changes: 1 addition & 1 deletion public/build/app.css

Large diffs are not rendered by default.

13 changes: 9 additions & 4 deletions public/build/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/build/bundle.js.map

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import resolve from '@rollup/plugin-node-resolve';
import livereload from 'rollup-plugin-livereload';
import { terser } from 'rollup-plugin-terser';
import json from '@rollup/plugin-json';
import replace from '@rollup/plugin-replace';

const production = !process.env.ROLLUP_WATCH;

Expand Down Expand Up @@ -47,6 +48,10 @@ export default {
json({
compact: true,
}),
replace({
'process.env.NODE_ENV': JSON.stringify('production'),
preventAssignment: true,
}),
// In dev mode, call `npm run start` once
// the bundle has been generated
!production && serve(),
Expand Down
8 changes: 8 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,14 @@
is-module "^1.0.0"
resolve "^1.22.1"

"@rollup/plugin-replace@^5.0.2":
version "5.0.2"
resolved "https://registry.yarnpkg.com/@rollup/plugin-replace/-/plugin-replace-5.0.2.tgz#45f53501b16311feded2485e98419acb8448c61d"
integrity sha512-M9YXNekv/C/iHHK+cvORzfRYfPbq0RDD8r0G+bMiTXjNGKulPnCT9O3Ss46WfhI6ZOCgApOP7xAdmCQJ+U2LAA==
dependencies:
"@rollup/pluginutils" "^5.0.1"
magic-string "^0.27.0"

"@rollup/pluginutils@^5.0.1":
version "5.0.2"
resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-5.0.2.tgz#012b8f53c71e4f6f9cb317e311df1404f56e7a33"
Expand Down

0 comments on commit c2eb93e

Please sign in to comment.