Skip to content

Commit

Permalink
fix static path
Browse files Browse the repository at this point in the history
  • Loading branch information
TrurlMcByte committed Jul 9, 2018
1 parent f294994 commit 0e02ea6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ module.exports = function module (moduleOptions) {
const jsonStaticRoutesPath = path.resolve(this.options.buildDir, path.join('dist', 'sitemap-routes.json'))

// sitemap.xml is written to static dir on generate mode
const xmlGeneratePath = path.resolve(this.options.srcDir, path.join('static', options.path))
const xmlGeneratePath = path.resolve(this.options.srcDir, path.join(typeof this.options.dir.static != 'undefined' ? this.options.dir.static : 'static', options.path))

options.pathGzip = (options.gzip) ? `${options.path}.gz` : options.path
const gzipGeneratePath = path.resolve(this.options.srcDir, path.join('static', options.pathGzip))
const gzipGeneratePath = path.resolve(this.options.srcDir, path.join(typeof this.options.dir.static != 'undefined' ? this.options.dir.static : 'static', options.pathGzip))

// Ensure no generated file exists
fs.removeSync(xmlGeneratePath)
Expand Down

0 comments on commit 0e02ea6

Please sign in to comment.