Last active
April 9, 2019 13:32
-
-
Save codeBelt/85c73dad818c14a8fa573f15450b3c40 to your computer and use it in GitHub Desktop.
Create React App 2.0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const path = require('path'); | |
module.exports = function override(config, env) { | |
config.resolve.alias = Object.assign({}, config.resolve.alias, { | |
environment: path.join(__dirname, 'src', 'environments', process.env.NODE_ENV) | |
}); | |
return config; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const path = require('path'); | |
const {override, addWebpackAlias} = require('customize-cra'); | |
module.exports = override( | |
addWebpackAlias({ | |
environment: path.join(__dirname, 'src', 'environments', process.env.NODE_ENV) | |
}) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment