Skip to content

ns8 modules: always generate the module logo image instead of inlining it as base64 #8136

Description

@andre8244

Description

NS8 module UIs ship their logo as ui/src/assets/module_default_logo.png. With the default
url-loader limit, webpack inlines images below the threshold as base64 data: URIs, so the
logo file is not always emitted as a real file in the build output.

The fix is a single block in the module ui/vue.config.js, which disables base64 encoding for
images:

chainWebpack: (config) => {
  config.module
    .rule("images")
    .use("url-loader")
    .loader("url-loader")
    .tap((options) => {
      // Do not base64 encode images URLs. Needed to always generate module logo image
      options.limit = -1;
      return options;
    });
},

It has already been added ad hoc to about half of the modules. This task is to apply it to the
remaining ones, so every module behaves consistently.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

Status
ToDo

Relationships

None yet

Development

No branches or pull requests

Issue actions