Files
Sunscreen/sunscreen_runtime/debugger-frontend/craco.config.js
Matthew Liu ce542d819e WIP
2023-07-21 13:11:39 -07:00

41 lines
1.1 KiB
JavaScript

const path = require('path');
const enableImportsFromExternalPaths = require("./src/helpers/craco/enableImportsFromExternalPaths");
module.exports = {
plugins: [
{
plugin: {
overrideWebpackConfig: ({ webpackConfig }) => {
enableImportsFromExternalPaths(webpackConfig, [
// Add the paths here
path.resolve("./node_modules/react")
]);
return webpackConfig;
},
},
},
],
webpack: {
configure: {
entry: {
app: 'src/App.tsx',
},
module: {
rules: [
{
test: /\.m?js$/,
resolve: {
fullySpecified: false,
},
},
],
},
resolve: {
alias: {
react: path.resolve("./node_modules/react"),
},
},
},
},
};