You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
1.3 KiB
JavaScript
37 lines
1.3 KiB
JavaScript
// Here is where you can define configuration overrides based on the execution environment.
|
|
// Supply a key to the default export matching the NODE_ENV that you wish to target, and
|
|
// the base configuration will apply your overrides before exporting itself.
|
|
export default {
|
|
// ======================================================
|
|
// Overrides when NODE_ENV === 'development'
|
|
// ======================================================
|
|
// NOTE: In development, we use an explicit public path when the assets
|
|
// are served webpack by to fix this issue:
|
|
// http://stackoverflow.com/questions/34133808/webpack-ots-parsing-error-loading-fonts/34133809#34133809
|
|
development: (config) => ({
|
|
compiler_public_path: `http://${config.server_host}:${config.server_port}/`,
|
|
proxy: {
|
|
enabled: false,
|
|
options: {
|
|
host: 'http://localhost:8000',
|
|
match: /^\/api\/.*/
|
|
}
|
|
}
|
|
}),
|
|
|
|
// ======================================================
|
|
// Overrides when NODE_ENV === 'production'
|
|
// ======================================================
|
|
production: (config) => ({
|
|
compiler_public_path: '/',
|
|
compiler_fail_on_warning: false,
|
|
compiler_hash_type: 'chunkhash',
|
|
compiler_devtool: null,
|
|
compiler_stats: {
|
|
chunks: true,
|
|
chunkModules: true,
|
|
colors: true
|
|
}
|
|
})
|
|
}
|