mirror of
https://github.com/jpd002/Play-.git
synced 2025-04-28 21:57:57 +03:00
26 lines
934 B
JavaScript
26 lines
934 B
JavaScript
module.exports = {
|
|
// Extend/override the dev server configuration used by CRA
|
|
// See: https://github.com/timarney/react-app-rewired#extended-configuration-options
|
|
devServer: function(configFunction) {
|
|
return function(proxy, allowedHost) {
|
|
// Create the default config by calling configFunction with the proxy/allowedHost parameters
|
|
// Default config: https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/config/webpackDevServer.config.js
|
|
const config = configFunction(proxy, allowedHost);
|
|
|
|
config.headers = {
|
|
'Cross-Origin-Embedder-Policy': 'require-corp',
|
|
'Cross-Origin-Opener-Policy': 'same-origin'
|
|
}
|
|
|
|
return config;
|
|
};
|
|
},
|
|
webpack: function(config, env) {
|
|
//Native code is built with NODEFS, we don't need it for a browser build
|
|
config.resolve.fallback = {
|
|
fs: false,
|
|
path: false
|
|
};
|
|
return config;
|
|
},
|
|
};
|