-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix baseHref, refactor config and build #385
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,15 +8,15 @@ const __DEV__ = env === 'development' | |
const __STAGING__ = env === 'staging' | ||
const __TEST__ = env === 'test' | ||
const __PROD__ = env === 'production' | ||
const __BASE__ = '/' | ||
const __BASE__ = __PROD__ ? '/stardust' : '' | ||
|
||
let config = { | ||
env, | ||
|
||
// ---------------------------------- | ||
// Project Structure | ||
// ---------------------------------- | ||
path_base: path.resolve(__dirname, '../'), | ||
path_base: __dirname, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The config file is a single file in the root now. |
||
dir_src: 'src', | ||
dir_dist: 'dist', | ||
dir_docs_root: 'docs', | ||
|
@@ -52,14 +52,14 @@ config = Object.assign({}, config, { | |
// ---------------------------------- | ||
// Compiler Configuration | ||
// ---------------------------------- | ||
compiler_devtool: false, | ||
compiler_hash_type: 'hash', | ||
compiler_devtool: __DEV__ && 'eval-cheap-module-source-map' || __STAGING__ && 'source-map', | ||
compiler_hash_type: __PROD__ ? 'chunkhash' : 'hash', | ||
compiler_inline_manifest: false, | ||
compiler_fail_on_warning: false, | ||
compiler_fail_on_warning: __TEST__ || __PROD__, | ||
compiler_lint: argv.lint !== false, | ||
compiler_quiet: false, | ||
compiler_output_path: paths.base(config.dir_docs_dist), | ||
compiler_public_path: __BASE__, | ||
compiler_public_path: __BASE__ || '/', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removed the /config directory and 5 files of complexity in favor of 4 lines of conditionals in a single file. This caught duplicates and unused config as well. |
||
compiler_vendor: [ | ||
'bluebird', | ||
'classnames', | ||
|
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No base href in local dev, which as you'll see in
index.ejs
just omits the base tag altogether.