backstory/frontend/craco.config.js

31 lines
731 B
JavaScript

module.exports = {
devServer: {
server: {
type: 'https',
// You can also specify custom certificates if needed:
// options: {
// cert: '/path/to/cert.pem',
// key: '/path/to/key.pem',
// }
},
proxy: {
'/api': {
target: 'https://backstory:8911', // Replace with your FastAPI server URL
changeOrigin: true,
secure: false, // Set to true if your FastAPI server uses HTTPS
},
}
},
webpack: {
configure: (webpackConfig) => {
// Add .ts and .tsx to resolve.extensions
webpackConfig.resolve.extensions = [
...webpackConfig.resolve.extensions,
'.ts',
'.tsx',
];
return webpackConfig;
},
},
};