8000 Consider `global` export flag. · Issue #6 · bootstarted/css-js-loader · GitHub
[go: up one dir, main page]

Skip to content
Consider global export flag. #6
Open
@10xjs

Description

@10xjs

It is not currently possible to define global classes as named exports when using css modules.

Defining global classes requires wrapping the default export in a :global scope block.

export default {
  ':global': {
    '.app': { ... },
  },
};

A global flag on the module or on each class would be parsed by the loader and the global scope would be created automatically.

On the module:

export const _global = true;
export const app = { ... };

On the class:

export const app = {
  _global: true,
  ...
};

Or as scope:

export const _scope = 'global';
export const app = { ... };
export const app = {
  _scope: `global`,
  ...
};

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0