I think this is a easy one.

I have a Symfony 4 application, with Webpack/Encore.

I have installed bootstrap 4 and everything works fine; I am trying to install bootstrap-datepicker.

So, I have created a file called `datepicker.js`, here is the content:

```
// js
require('bootstrap-datepicker');
require('../../../node_modules/bootstrap-datepicker/dist/locales/bootstrap-datepicker.it.min');

// css
require('../../../node_modules/bootstrap-datepicker/dist/css/bootstrap-datepicker.css');

'use strict';

$(document).ready(function() {
    $('.datepicker').datepicker({

    });
});

```

JQuery and Bootstrap is provided by another file, called `vendors.js`:

```
// js
require('jquery');
require('bootstrap');

// scss
require('../scss/vendors.scss');

```

`vendors.js` is a shared entry. Here is the portion of my `webpack.config.js` file:

```
Encore
    ...

    // shared entries
    .createSharedEntry('vendors', [
        './assets/js/vendors.js'
    ])

    ...

```

On the page on I want to use datepicker I have the classic error:

```
jquery.js:3869 Uncaught TypeError: $(...).datepicker is not a function

```

Why am I wrong?