You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thomas Jaggi edited this page Jan 9, 2017
·
2 revisions
How to load specific files in node_modules with `babel-loader`
By default, we exclude `node_modules` from babel to speed up the transpiling. In order to re-add specific files, the pattern in [gulp/js/default.js](https://github.com/unic/estatico/blob/develop/gulp/js/default.js#L82) can be extended the following way: `exclude: /node_modules(?!\/ally\.js)/`.
This would allow you to import specific files from a library like [ally.js](https://allyjs.io/) (e.g. using `import focusSource from 'ally.js/src/style/focus-source'`). [[Source](https://github.com/webpack/webpack/issues/2031#issuecomment-244921229)]
estatico is made by unic & the community. feel free to give feedback and extend these documents