-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.js
31 lines (28 loc) · 1.05 KB
/
config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// Import dependencies
const path = require('path')
/**
* Configuration variables for Webpack.
* Set your own values here.
*/
const hostName = 'localhost' // Hostname for the server
const portNumber = 8080 // Port number for the server
const jsFileName = './assets/js/bundle.js' // JavaScript file name once built
const cssFileName = './assets/css/styles.css' // CSS file name once built
const sourceMaps = true // If source maps should be generated(only in dev mode)
const devtool = 'inline-source-map' // Source map type. Refer to: https://webpack.js.org/configuration/devtool/
/**
* Set config.
* These don't need to change, but feel free to change to your needs.
*/
const config = {}
config.ENTRY = path.join(__dirname, '/src')
config.OUTPUT = path.join(__dirname, '/public')
config.DIST = path.join(__dirname, `/dist/${process.env.WEBPACK_ENV || 'web'}`)
config.HOST = hostName
config.PORT = portNumber
config.JSFILENAME = jsFileName
config.CSSFILENAME = cssFileName
config.SOURCEMAPS = sourceMaps
config.DEVTOOL = devtool
// Export config
module.exports = config