Skip to content

Commit cd48e15

Browse files
authored
docs: add packager warning
1 parent 9590ae8 commit cd48e15

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,13 @@ define rules and policies (rules using classes).
123123

124124
As an optional third parameter you can pass an [options](#options) object.
125125

126+
> **Attention**: When using packagers such as _webpack_ or _rollup_ your code is
127+
optimized in a way that requires you to register your rules in a safer way.
128+
Make you sure you read through the [verb-object-mapping section](https://github.com/mblarsen/browser-acl#best-practice).
129+
In short it encourges you to use the [`acl.register` function](https://github.com/mblarsen/browser-acl#register)
130+
to register your models explictly, so that however the packager mangles your
131+
variables the code will still work in production.
132+
126133
### Plain objects vs function/class
127134

128135
The above describes setup in applications where you use ES6 classes or named
@@ -146,7 +153,7 @@ E.g. a post:
146153
}
147154
```
148155

149-
See the details in browser-acl [verb-object mapper section](https://github.com/mblarsen/browser-acl#subjectmapper).
156+
See the details in browser-acl [verb-object mapper section](https://github.com/mblarsen/browser-acl#verb-object-mapping).
150157

151158
## Usage
152159

0 commit comments

Comments
 (0)