Craco plugin which allows to import uncompiled modules from outside the src
directory.
npm i --save-dev @dealmore/craco-plugin-babel-include # npm or
yarn add -D @dealmore/craco-plugin-babel-include # yarn
// craco.config.js
const babelInclude = require('@dealmore/craco-plugin-babel-include');
module.exports = {
plugins: [
{
plugin: babelInclude,
options: {
include: ['@workspace/shared', '../ui-components'],
},
},
],
};
Option | Type | Description |
---|---|---|
include |
string | string[] |
npm-package name or directory to include. |
Apache-2.0 - see LICENSE for details.