-
Notifications
You must be signed in to change notification settings - Fork 159
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
Switch from webpack to rollup #4584
Conversation
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some questions / things I noticed:
- when running
build:w
, a change in one workspace results in recompiling all workspaces. possible to limit this to the changed workspace only? - for running with oc10 we need to have a dev server - ideally not persisting to disk but to RAM, to save SSD cell max write counts.
Things I noticed about the scripts in package.json:
- afaict scripts with
ldap
(docker:ldap
andtest:acceptance:ldap
) are not needed. I added a commit that removes those. - would make sense to keep the script for killing dockerized selenium and redis in docker. I added a commit that adds those.
- it should not be in scope of this repo to take care of running an ocis instance, so IMO it's good that you removed the related scripts.
Other questions:
- Why is everything a devDependency? I can't see real dependencies anywhere. Is it specific to the workspaces feature that all dependencies are devDependencies?
Thanks for the input, true it only should rebuild the required parts. This is because the vendor is required by all other apps and require js needs to import the updated vendor bundle in every app. I have a look if this can be fixed. I will bring back the dev server, thanks for the input :) maybe something like nollup to get hmr and dev sever in development. 🧐 everything is a devDependency because we do not have a real runtime dependency that is required by a index.js served by node. Instead we bundle everything to dist and in this stage there is no requirement to serve anything from node_modules Npm mentions this here https://docs.npmjs.com/specifying-dependencies-and-devdependencies-in-a-package-json-file
|
|
Dev server is not working with my oc10 oauth2 setup. Trying on master works fine - trying to debug this. |
Found the issue... There was a newer version of oidc-client lib with which there was always a request to .well-known even though it was an oauth2 setup. For now, I'll pin the version to 1.10.1 where it still works. I'll open a ticket to update it to the latest version and see what changed there. Not scope of this PR. |
Hmm, thinking now about ports... we can set an arbitrary port for Web when running against oC10 so we could actually always pick port 9100 and that way wouldn't need two scripts for devServer. |
2848acc
to
cb0de23
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really, really awesome job, I love it. There are some quirks that need fixing:
For both running on oc10 and ocis backend there is a JS error in the console:
null:1 Failed to load resource: the server responded with a status of 404 (Not Found)
. Happens on app load and app switch.
When running on ocis, switching to the accounts UI, the list of accounts is empty.
packages/web-runtime/l10n/Makefile
is broken -> let's move it to a top level l10n folder and make it generic for all apps + runtime from packages.
oc10 marketplace app build is broken (remove signing step from makefile, see for yourself).
This is not a problem with this PR. We're using |
Ah yes, right :-) |
OCIS PR is in progress Edit: owncloud/ocis#1597, we need to keep care of it in ocis. |
Coming from @kulmann AFAIK we wanted to remove the URL part from the icon anyway, didn't we? |
cleanup dependencies cleanup structure optimize generated bundles
clean dependencies for every app clean scripts cleanup packages.json, names, version, descriptions... add dev server for ocis and oc10 move oc10 php files and appinfo to own package
Motivation of change:
before we used webPack to bundle the web repository, over time other ocis addons switched to rollup wich speeds up the whole development proccess and thanks to its tree-shaking makes whole bundle smaller. We also started to restructure the repository to make it easier to understand and get started.
Changes:
Open tasks: