first of all, i started to use bud + sage 10 and they are fantastic!!
I’m trying to add in babel tranformation code from node_modules like this
But not work, and babel stop to transform code of all project so, I tried to use an hook like this solution, but nothing works.
My configuration is default with bud 5.3.2 and sage 10-beta-3 (i changed only tailwind with bootstrap)
I would do it like this:
.setInclude([app.path('src'), app.path('project', 'node_modules')]);
bud.build.items maps loaders to options.
bud.build.rules is what you want here – the
exclude paths are defined in regards to webpack rules, not loaders.
include value(s) must be absolute paths to work in webpack. Your attempt wouldn’t work because
'node_modules' isn’t an absolute path.
app.path will provide you absolute paths or you can resolve them with node.
There is a PR open that will improve this API:
@filpiro We released 5.4.0 and it removes
excludes from all of the rules included in core.
The above fix should work without calling