Files
artcraft/packages/power.stream/craco.config.js
T
Brandon Thomas 7e88766a77 Refactor package names to match the respective websites
The old package names were beginning to get unclear and confusing.
2022-12-05 21:41:28 -05:00

25 lines
613 B
JavaScript

const path = require("path");
const { getLoader, loaderByName } = require("@craco/craco");
const packages = [];
packages.push(path.join(__dirname, "../components"));
module.exports = {
webpack: {
configure: (webpackConfig, arg) => {
const { isFound, match } = getLoader(
webpackConfig,
loaderByName("babel-loader")
);
if (isFound) {
const include = Array.isArray(match.loader.include)
? match.loader.include
: [match.loader.include];
match.loader.include = include.concat(packages);
}
return webpackConfig;
},
},
};