mirror of
https://github.com/Sunscreen-tech/Sunscreen.git
synced 2026-01-20 02:57:56 -05:00
41 lines
1.1 KiB
JavaScript
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"),
|
|
},
|
|
},
|
|
},
|
|
},
|
|
}; |