Commit c2c70e4a authored by 邓晓峰's avatar 邓晓峰

add webpack default output-path

parent 17c0fb35
...@@ -19,7 +19,7 @@ module.exports = function (options) { ...@@ -19,7 +19,7 @@ module.exports = function (options) {
mode: options.mode, mode: options.mode,
entry: options.entry, entry: options.entry,
output: Object.assign({ output: Object.assign({
path: path.resolve(argv.releasepath, pkg.name.toLocaleLowerCase()) || path.resolve(process.cwd(), pkg.name.toLocaleLowerCase()), path: argv.releasepath ? path.resolve(argv.releasepath, pkg.name.toLocaleLowerCase()) : path.resolve(process.cwd(), pkg.name.toLocaleLowerCase()),
publicPath: "/".concat(pkg.name.toLocaleLowerCase()) publicPath: "/".concat(pkg.name.toLocaleLowerCase())
}, options.output), }, options.output),
// Merge with env dependent settings // Merge with env dependent settings
......
...@@ -10,7 +10,7 @@ module.exports = options => ({ ...@@ -10,7 +10,7 @@ module.exports = options => ({
entry: options.entry, entry: options.entry,
output: Object.assign( output: Object.assign(
{ {
path: path.resolve(argv.releasepath, pkg.name.toLocaleLowerCase()) || path.resolve(process.cwd(), pkg.name.toLocaleLowerCase()), path: argv.releasepath ? path.resolve(argv.releasepath, pkg.name.toLocaleLowerCase()) : path.resolve(process.cwd(), pkg.name.toLocaleLowerCase()),
publicPath: `/${pkg.name.toLocaleLowerCase()}`, publicPath: `/${pkg.name.toLocaleLowerCase()}`,
}, },
options.output, options.output,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment