Skip to content

Commit

Permalink
fix:doc server is not work with nodejs api
Browse files Browse the repository at this point in the history
  • Loading branch information
janryWang committed Apr 15, 2019
1 parent 3b892d9 commit ed267a8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
3 changes: 0 additions & 3 deletions examples/doc-scripts.header.html

This file was deleted.

6 changes: 3 additions & 3 deletions lib/webpack/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ module.exports = _async(function (mode, options, webpackConfig) {

var config = require("./" + mode);

var userConfigPath = path.resolve(options.input, './doc-scripts.config.js');
var headerPath = path.resolve(options.input, './doc-scripts.header.html');
var footerPath = path.resolve(options.input, './doc-scripts.footer.html');
var userConfigPath = path.resolve(cwd, './doc-scripts.config.js');
var headerPath = path.resolve(cwd, './doc-scripts.header.html');
var footerPath = path.resolve(cwd, './doc-scripts.footer.html');
return _continue(_catch(function () {
var userConfigContents = webpackConfig;
return _continue(_catch(function () {
Expand Down
6 changes: 3 additions & 3 deletions src/webpack/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ const cwd = process.cwd()

module.exports = async function(mode, options = {}, webpackConfig) {
const config = require(`./${mode}`)
const userConfigPath = path.resolve(options.input, './doc-scripts.config.js')
const headerPath = path.resolve(options.input, './doc-scripts.header.html')
const footerPath = path.resolve(options.input, './doc-scripts.footer.html')
const userConfigPath = path.resolve(cwd, './doc-scripts.config.js')
const headerPath = path.resolve(cwd, './doc-scripts.header.html')
const footerPath = path.resolve(cwd, './doc-scripts.footer.html')
try {
let userConfigContents = webpackConfig
try {
Expand Down

0 comments on commit ed267a8

Please sign in to comment.