Skip to content

Bug: Cannot be used in a typescript environment with "memory" provider #116

@thomas-br

Description

@thomas-br

Using the plugin with the provider-rest-cache-memory provider fails in a typescript (CommonJS) environment (as generated by the create-strapi-app with ts support):

require() of ES Module .../node_modules/@strapi-community/provider-rest-cache-memory/node_modules/quick-lru/index.js from .../node_modules/@strapi-community/provider-rest-cache-memory/lib/MemoryCacheProvider.js not supported.
Instead change the require of index.js in .../node_modules/@strapi-community/provider-rest-cache-memory/lib/MemoryCacheProvider.js to a dynamic import() which is available in all CommonJS modules.`

Related:
sindresorhus/quick-lru#50
sindresorhus/quick-lru#28

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions