I'm trying to include @mycompany/package1, and @mycompany/package2 to be compiled along with the rest of my code using babel-node. Since package1 and package2 are in ES6. (Also note I'm not using Webpack)
In my jest config I added the below option into my jest config which works fine. When testing the code will compile the packages correctly
"transformIgnorePatterns": [ "/node_modules/(?!(@mycompany)/).*/" ], But when trying to run babel-node I get errors. In my babel.config.js
module.exports = { presets: [ '@babel/preset-flow', [ '@babel/preset-env', { targets: { node: 8 } } ] ], plugins: ['@babel/plugin-proposal-class-properties'] }; I tried adding the below code to my babel.config.js but it still complains about ES6 errors within my node_modules/@mycompany/package1
I tried to include the viz package but then babel wouldn't compile my src files
include: [path.resolve(__dirname, 'node_modules/@mycompany/package1')]
include: ['/node_modules/((@mycompany)/).*/']
I tried to exclude everything but @mycompany packages but I still get transpile errors in my package1
exclude: [/node_modules\/(?!(@mycompany)\/).*/],
I tried playing with ignore but those don't seem like they are the right options based on reading the docs