Skip to content

Commit

Permalink
fix(docz-core): build when base prop
Browse files Browse the repository at this point in the history
  • Loading branch information
pedronauck committed Jun 9, 2018
1 parent b198075 commit 6001171
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions packages/docz-core/src/bundlers/webpack/build.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import * as fs from 'fs-extra'
import * as path from 'path'
import chalk from 'chalk'
import logger from 'signale'
import webpack, { Configuration } from 'webpack'
Expand Down Expand Up @@ -116,8 +115,7 @@ const onError = (err: Error) => {
}

export const build = (args: Args) => async (config: Configuration) => {
const base = paths.servedPath(args.base)
const dist = path.join(paths.getDist(args.dest), base)
const dist = paths.getDist(args.dest)

try {
await fs.ensureDir(dist)
Expand Down
2 changes: 1 addition & 1 deletion packages/docz-core/src/bundlers/webpack/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export const createConfig = (babelrc: BabelRC) => (

config.output
.pathinfo(true)
.path(isProd ? path.join(dist, base) : dist)
.path(dist)
.when(isProd, outputProd, outputDev)
.crossOriginLoading('anonymous')

Expand Down

0 comments on commit 6001171

Please sign in to comment.