Last active
April 25, 2019 06:09
-
-
Save davidgilbertson/24aacb04a33a647dc08046498f1f5a25 to your computer and use it in GitHub Desktop.
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
/* -- webpack.config.shared.js -- */ | |
export const sharedConfig = { | |
alias: { | |
'Utils': path.resolve(__dirname, '../src/app/utils/'), | |
'Components': path.resolve(__dirname, '../src/app/components/'), | |
}, | |
}; | |
/* -- webpack.config.dev.js -- */ | |
import { sharedConfig } from './webpack.config.shared.js'; | |
const config = { | |
// development config | |
resolve: { | |
alias: sharedConfig.alias, | |
}, | |
}; | |
/* -- webpack.config.prod.js -- */ | |
import { sharedConfig } from './webpack.config.shared.js'; | |
const config = { | |
// production config | |
resolve: { | |
alias: sharedConfig.alias, | |
}, | |
}; | |
/* -- SomeComponent.js -- */ | |
import toNumber from 'Utils/toNumber'; | |
import toString from 'Utils/toString'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment