Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
kylorhall-atlassian committed Oct 15, 2024
1 parent 29a65ed commit 4acfa57
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions packages/babel-plugin/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ export interface PluginOptions {
/**
* Adds a defined prefix to the generated classes' hashes.
* Useful in micro frontend environments to avoid clashing/specificity issues.
*
* This will throw an error if used alongside extraction or `extract: true`.
*/
classHashPrefix?: string;
}
Expand Down
2 changes: 2 additions & 0 deletions packages/parcel-transformer/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ export interface ParcelTransformerOpts extends BabelPluginOpts {
/**
* Adds a defined prefix to the generated classes' hashes.
* Useful in micro frontend environments to avoid clashing/specificity issues.
*
* This will throw an error if used alongside extraction or `extract: true`.
*/
classHashPrefix?: string;
}
2 changes: 1 addition & 1 deletion website/packages/docs/src/pages/pkg-babel-plugin.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Will cache the result of statically evaluated imports.

Adds a prefix to the generated hashed css rule names. The valued passed to it gets hashed in conjunction with the rest of the rule declaration.

This is useful when `@compiled` is being used in a micro frontend environment by multiple packages and you want to avoid specificity issues.
This is useful when `@compiled` is being used in a micro frontend environment by multiple packages and you want to avoid specificity issues. Please note that mixing this with extraction is not supported and Parcel or Webpack will throw an error if combined.

The currently accepted regex for this value is `^[a-zA-Z\-_]+[a-zA-Z\-_0-9]*$`.

Expand Down

0 comments on commit 4acfa57

Please sign in to comment.