Initial commit - PromptTech
This commit is contained in:
43
frontend/craco.config.js
Normal file
43
frontend/craco.config.js
Normal file
@@ -0,0 +1,43 @@
|
||||
// craco.config.js
|
||||
const path = require("path");
|
||||
require("dotenv").config();
|
||||
|
||||
module.exports = {
|
||||
webpack: {
|
||||
alias: {
|
||||
"@": path.resolve(__dirname, "src"),
|
||||
},
|
||||
configure: (webpackConfig) => {
|
||||
// Prevent build from failing on warnings
|
||||
webpackConfig.stats = {
|
||||
warnings: false,
|
||||
};
|
||||
return webpackConfig;
|
||||
},
|
||||
},
|
||||
devServer: {
|
||||
port: 5300,
|
||||
open: false,
|
||||
historyApiFallback: true,
|
||||
hot: true,
|
||||
client: {
|
||||
overlay: {
|
||||
errors: true,
|
||||
warnings: false,
|
||||
},
|
||||
webSocketURL: {
|
||||
port: 443,
|
||||
},
|
||||
},
|
||||
setupMiddlewares: (middlewares, devServer) => {
|
||||
return middlewares;
|
||||
},
|
||||
onListening: function (devServer) {
|
||||
if (!devServer) {
|
||||
throw new Error("webpack-dev-server is not defined");
|
||||
}
|
||||
const port = devServer.server.address().port;
|
||||
console.log("Frontend listening on port:", port);
|
||||
},
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user