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

Frontend: packages folder removal #77

Open
ZakarFin opened this issue Jan 20, 2025 · 3 comments
Open

Frontend: packages folder removal #77

ZakarFin opened this issue Jan 20, 2025 · 3 comments
Assignees
Milestone

Comments

@ZakarFin
Copy link
Member

ZakarFin commented Jan 20, 2025

Packages folder under oskari-frontend has bundle.js files that link implementation files to a bundle id. This is unnecessary complication and we could make it more straightforward and more easy to document by just moving the bundle.js files from packages to bundles.

Current thoughts on this is that we could also changes the default implementation filename from bundle.js to index.js. This way the imports on main.js in applications would change from:

import 'oskari-loader!oskari-frontend/packages/mapping/ol/mapmodule/bundle.js';

to:

import 'oskari-bundle!oskari-frontend/bundles/mapping/mapmodule';

and it would make it easier to draw the line from the bundle.js file to the bundle implementation.

Something like this has already been done on these:

The bundle.js file or similar is still required for linking localization files for the bundle, but it could be possible to discover the localization files on the build process as they are always under resources/locale under a bundle implementation.

@ZakarFin ZakarFin added this to the 3.0.0 milestone Jan 28, 2025
@ZakarFin
Copy link
Member Author

@ZakarFin
Copy link
Member Author

ZakarFin commented Feb 19, 2025

The bundles are migrated like this: oskariorg/oskari-frontend#2793

And apps like this: oskariorg/sample-application#37

@ZakarFin ZakarFin self-assigned this Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant