Skip to content

Default export exposed as named default #8

Closed
@ithinkdancan

Description

@ithinkdancan

when using this with Next.js using the string plugin format Next spits out a type error when applying the config

TypeError: require(...) is not a function

const config = {
  plugins: [
    [
      'postcss-assign-layer',
      [
        {
          include: 'core/*.module.css',
          layerName: 'core',
        },
      ],
    ],
  ],
};

module.exports = config;

From what I can tell this has to do with how the plugin is built. Next is calling require(pluginPath)(options) where as the plugin is exporting default which would require it to call require(pluginPath).default(options)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions