Skip to content

Commit

Permalink
feat: unique classnames based on package name/version,
Browse files Browse the repository at this point in the history
new classPrefix option

Closes callstack#299. See also callstack#208, callstack#178
  • Loading branch information
chrisbateman committed Apr 3, 2019
1 parent a5be0c6 commit eb6b626
Show file tree
Hide file tree
Showing 10 changed files with 292 additions and 143 deletions.
4 changes: 4 additions & 0 deletions docs/CONFIGURATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ module.exports = {

If you need to specify custom babel configuration, you can pass them here. These babel options will be used by Linaria when parsing and evaluating modules.

- `classPrefix: string` (default: `""`):

Adds a string before generated class names, e.g. `.myCustomPrefix_abcdef` instead of `abcdef`.

## `linaria/babel` preset

The preset pre-processes and evaluates the CSS. The bundler plugins use this preset under the hood. You also might want to use this preset if you import the components outside of the files handled by your bundler, such as on your server or in unit tests.
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
"normalize-path": "^3.0.0",
"postcss": "^7.0.14",
"react-is": "^16.8.3",
"read-pkg": "^5.0.0",
"rollup-pluginutils": "^2.4.1",
"source-map": "^0.7.3",
"strip-ansi": "^5.0.0",
Expand Down
Loading

0 comments on commit eb6b626

Please sign in to comment.