Skip to content

Instantly share code, notes, and snippets.

@codeBelt
Created January 7, 2021 20:28
Show Gist options
  • Save codeBelt/87eba7286567b2a51229247c0171e4a1 to your computer and use it in GitHub Desktop.
Save codeBelt/87eba7286567b2a51229247c0171e4a1 to your computer and use it in GitHub Desktop.
const withPlugins = require('next-compose-plugins');
const path = require('path');
module.exports = withPlugins([], {
webpack: (config) => {
const clientEnv = process.env.CLIENT_ENV || 'production';
config.resolve.alias = {
...config.resolve.alias,
environment: path.join(__dirname, 'src', 'environments', clientEnv),
};
return config;
},
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment