Skip to content

Commit

Permalink
Webpack devServer customization
Browse files Browse the repository at this point in the history
  • Loading branch information
artur-barrionuevo committed Oct 14, 2024
1 parent 1683fce commit 9316a5d
Showing 1 changed file with 24 additions and 3 deletions.
27 changes: 24 additions & 3 deletions frontend/volto.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,28 @@
const addons = ['volto-procergs-siteplone'];
const theme = '';

module.exports = {
addons,
theme
// Extend Webpack configuration
module.exports = (config) => {
// Keep your existing addons and theme
config.addons = addons;
config.theme = theme;

// Extend Webpack dev server configuration
config.devServer = {
port: 3000, // Force it to only use port 3000
host: '0.0.0.0', // Allow access from any IP
hot: true, // Enable hot reloading
historyApiFallback: true, // Fallback for SPA routing
client: {
overlay: {
warnings: false,
errors: true,
},
},
headers: {
'Access-Control-Allow-Origin': '*', // Optional: Add CORS header if needed
},
};

return config;
};

0 comments on commit 9316a5d

Please sign in to comment.