Details
-
Task
-
Resolution: Won't Do
-
L3 - Default
-
None
-
2.0.0
-
4
-
Not defined
Description
On many occasions, we need to include static assets like images (png, svg, etc.) in the markup or in CSS by either link or inlined.
Webpack by default has two ways to deal with static assets: Either from a component folder where it needs to be relatively referenced from the respective JS file, or from the public folder, as described here and here.
Option 2 (referencing the public folder) doers not seem to work at all in CSS, option 1 is not ideal since it will result in duplication of asset files if they’re being used by different components.
Ideally, we have a central place for shared assets, and webpack or a webpack loader resolves the urls from the .scss file relative to this central asset directory, so in CSS we can use:
background-image: url('my-image.png')
which would resolve to something like
background-image: url('path/to/assets/my-image.png')
in CSS.
Alternatively, if all assets would be stroed in the same directory as the CSS, we wouldn't need to resolve any URLs. Not sure if this would work with the way CSS is treated in dev mode though.
mgm-controller-panel
This is the controller panel for Smart Panels app
Attachments
Issue Links
- is related to
-
OPT-697 Remove bpmn font from project
- Done