Skip to content
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

Clone this wiki locally