mirror of
https://github.com/c8r/x0.git
synced 2024-09-11 13:45:52 +03:00
Add debug flag
This commit is contained in:
parent
f35b536a7c
commit
5a3703c7f8
3
cli.js
3
cli.js
@ -74,6 +74,9 @@ const cli = meow(`
|
||||
webpack: {
|
||||
type: 'string',
|
||||
},
|
||||
debug: {
|
||||
type: 'boolean'
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
@ -172,6 +172,10 @@ module.exports = async (opts) => {
|
||||
|
||||
const config = merge(baseConfig, opts.webpack)
|
||||
|
||||
config.mode = opts.debug ? 'development' : 'production'
|
||||
if (opts.debug) {
|
||||
config.stats = 'verbose'
|
||||
}
|
||||
config.entry = path.join(__dirname, './entry')
|
||||
config.output = {
|
||||
path: opts.outDir,
|
||||
|
@ -50,6 +50,11 @@ module.exports = async (opts) => {
|
||||
})
|
||||
)
|
||||
|
||||
if (opts.debug) {
|
||||
config.stats = 'verbose'
|
||||
// todo: enable other logging
|
||||
}
|
||||
|
||||
const serveOpts = {
|
||||
config,
|
||||
dev,
|
||||
|
Loading…
Reference in New Issue
Block a user