Skip to content

Usage of native node-module Buffer increase bundle size with 19kb #142

Description

@gerhardsletten

This simple line in cache.ts will make webpack bundle an extra 19 kb shim for client-side scripts:

export const convertActionToBase64 = (action: Action) => {
  return Buffer.from(JSON.stringify(action)).toString('base64');
};

image

Would it not be better to use a simple string concat like this:

const convertActionToBase64 = (action) => {
  return `${action.method}${action.endpoint}`
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions