-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(build): use node 6 compat (no babel-node)
- Loading branch information
1 parent
71d93f7
commit 0e5593f
Showing
13 changed files
with
62 additions
and
74 deletions.
There are no files selected for viewing
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,13 @@ | ||
export default (config) => { | ||
module.exports = (config) => { | ||
// We use an explicit public path in development to resolve this issue: | ||
// http://stackoverflow.com/questions/34133808/webpack-ots-parsing-error-loading-fonts/34133809#34133809 | ||
const __BASE__ = `http://${config.server_host}:${config.server_port}/` | ||
|
||
return { | ||
compiler_devtool: 'eval-cheap-module-source-map', | ||
compiler_public_path: __BASE__, | ||
compiler_globals: { | ||
...config.compiler_globals, | ||
compiler_globals: Object.assign({}, config.compiler_globals, { | ||
__BASE__: JSON.stringify(__BASE__), | ||
}, | ||
}), | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
import base from './_default' | ||
const base = require('./_default') | ||
|
||
const envConfig = require(`./${base.env}`).default(base) | ||
const envConfig = require(`./${base.env}`)(base) | ||
|
||
export default { ...base, ...envConfig } | ||
|
||
module.exports = Object.assign({}, base, envConfig) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,11 @@ | ||
const __BASE__ = '/stardust/' | ||
|
||
export default (config) => ({ | ||
module.exports = (config) => ({ | ||
compiler_fail_on_warning: true, | ||
compiler_hash_type: 'chunkhash', | ||
compiler_devtool: false, | ||
compiler_public_path: __BASE__, | ||
compiler_globals: { | ||
...config.compiler_globals, | ||
compiler_globals: Object.assign({}, config.compiler_globals, { | ||
__BASE__: JSON.stringify(__BASE__), | ||
}, | ||
}), | ||
}) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import config from './production' | ||
const config = require('./production') | ||
|
||
// Enable source-maps in staging | ||
config.compiler_devtool = 'source-map' | ||
|
||
export default config | ||
module.exports = config |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// Just use the production configuration | ||
import production from './production' | ||
const production = require('./production') | ||
|
||
export default production | ||
module.exports = production |
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
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
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
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