-
Notifications
You must be signed in to change notification settings - Fork 4
Description
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:
- https://github.com/oskariorg/oskari-frontend/tree/2.14.2/bundles/catalogue/metadata/bundle.js
- https://github.com/oskariorg/oskari-frontend/tree/2.14.2/bundles/framework/layeranalytics
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.