Skip to content

Use plugin architecture instead of custom builds (RFC) #243

@krmax44

Description

@krmax44

I'd like to propose using ESM imports and a plugin system as an addition (or replacement) for custom builds. To me, this has the following advantages:

  • Much more flexible, no re-builds required when needs change
  • No build tools required for end-users, resulting in much faster installs
  • Everyone uses the same release code, making it reproducable and easier to debug
  • More in-line of how other tools work, treeshaking is expected to work without manual tinkering

The API could look something like this:

import ExifReader, { png, jpeg, DateTime, GPSCoordinates } from 'exifreader';

const exifReader = new ExifReader().use(png, jpeg, DateTime, GPSCoordinates);
const tags = await exifReader.load(file);

Since we only import some modules, the build processor can exclude the unused ones.

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