Skip to content

Commit 96f641b

Browse files
committed
Add note about external dependencies to docs, formatting
1 parent e871b8b commit 96f641b

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const DrupalLibrariesPlugin = require('drupal-libraries-webpack-plugin');
3030

3131
module.exports = {
3232
plugins: [
33-
new DrupalLibrariesPlugin()
33+
new DrupalLibrariesPlugin()
3434
],
3535
};
3636
```
@@ -45,6 +45,14 @@ You can explicitly add a Drupal library dependency to module by using a special
4545
require('@drupal(core/jquery)')
4646
```
4747

48+
Drupal libraries must be added as [external dependencies](https://webpack.js.org/configuration/externals/) in your webpack configuration:
49+
50+
```js
51+
externals: {
52+
'@drupal(drupal/core)': 'Drupal'
53+
}
54+
```
55+
4856
### Configuration
4957

5058
#### `path`

0 commit comments

Comments
 (0)