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

Use rollupjs instead of webpack #104

Merged
merged 5 commits into from
Sep 3, 2023
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# App
/tuwat

# Web ignore js map files
pkg/web/static/js/*.map

# App configuration
/*.toml
!/config.example.toml
Expand Down
1,210 changes: 144 additions & 1,066 deletions package-lock.json

Large diffs are not rendered by default.

9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@
"reconnecting-websocket": "^4.4.0"
},
"devDependencies": {
"webpack": "^5.88.2",
"webpack-cli": "^5.1.4"
"@rollup/plugin-node-resolve": "^15.2.1",
"@rollup/plugin-terser": "^0.4.3",
"rollup": "^3.28.1"
},
"scripts": {
"watch": "webpack watch",
"build": "webpack"
"watch": "rollup -c --watch",
"build": "rollup -c"
},
"repository": {
"type": "git",
Expand Down
28 changes: 21 additions & 7 deletions pkg/web/static/js/index.min.js

Large diffs are not rendered by default.

14 changes: 0 additions & 14 deletions pkg/web/static/js/index.min.js.LICENSE.txt

This file was deleted.

1 change: 0 additions & 1 deletion pkg/web/static/js/index.min.js.map

This file was deleted.

13 changes: 13 additions & 0 deletions rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { nodeResolve } from '@rollup/plugin-node-resolve';
import terser from '@rollup/plugin-terser';

export default {
input: 'pkg/web/static/js/index.js',
output: {
file: 'pkg/web/static/js/index.min.js',
format: 'es',
sourcemap: true,
plugins: [terser()]
},
plugins: [nodeResolve()]
};
11 changes: 0 additions & 11 deletions webpack.config.js

This file was deleted.