Last active
September 10, 2018 10:23
-
-
Save joshuacrass/5870e04927d476ec5dfe7e22189c26ab to your computer and use it in GitHub Desktop.
react-starter Webpack paths.js config file
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
// paths.js | |
// Paths will export some path variables that we'll | |
// use in other Webpack config and server files | |
const path = require("path"); | |
const fs = require("fs"); | |
const appDirectory = fs.realpathSync(process.cwd()); | |
const resolveApp = relativePath => path.resolve(appDirectory, relativePath); | |
module.exports = { | |
appAssets: resolveApp("src/assets"), // For images and other assets | |
appBuild: resolveApp("build"), // Prod built files end up here | |
appConfig: resolveApp("config"), // App config files | |
appHtml: resolveApp("src/index.html"), | |
appIndexJs: resolveApp("src/index.jsx"), // Main entry point | |
appSrc: resolveApp("src") // App source | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment