diff --git a/playground/config-overrides.js b/playground/config-overrides.js index 8f2c7b65..855e5a9e 100644 --- a/playground/config-overrides.js +++ b/playground/config-overrides.js @@ -1,9 +1,19 @@ const path = require('path'); -module.exports = function override(config, env) { - config.resolve = Object.assign({}, config.resolve, { - modules: [path.resolve(__dirname, 'node_modules'), 'node_modules'], - }); +module.exports = { + webpack: function override(config, env) { + config.resolve = Object.assign({}, config.resolve, { + modules: [path.resolve(__dirname, 'node_modules'), 'node_modules'], + }); - return config; + return config; + }, + devServer: function(configFunction) { + return function(proxy, allowedHost) { + const config = configFunction(proxy, allowedHost); + config.headers = { 'Access-Control-Allow-Origin': '*' }; + + return config; + }; + }, };