-
Notifications
You must be signed in to change notification settings - Fork 291
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(build): 修复了build是 publicPath 的问题
- Loading branch information
luoxue
committed
Nov 26, 2019
1 parent
86a0418
commit ac2ab19
Showing
29 changed files
with
42 additions
and
120 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
const HtmlWebpackPlugin = require('html-webpack-plugin'); | ||
|
||
module.exports = ({ config, options }) => { | ||
let template = 'public/index.html', filename = 'index.html', title = 'asdasd'; | ||
let template = 'public/index.html', filename = 'index.html'; | ||
if (options.name) { | ||
const name = options.name; | ||
entry = options.pages[name].template; | ||
filename = options.pages[name].filename; | ||
title = options.pages[name].title; | ||
publicPath = options.pages[name].publicPath; | ||
} | ||
return () => { | ||
config.plugin('html') | ||
.use(HtmlWebpackPlugin, [{ | ||
template, | ||
filename, | ||
title | ||
publicPath | ||
}]) | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file not shown.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<!DOCTYPE html> | ||
<html><head><link href="index.css" rel="stylesheet"></head> | ||
<html><head><link href="/common/index.css" rel="stylesheet"></head> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>index page1</title> | ||
<body><script type="text/javascript" src="manifest.bundle.js"></script><script type="text/javascript" src="chunk-vendors.bundle.js"></script><script type="text/javascript" src="index.bundle.js"></script></body> | ||
<body><script type="text/javascript" src="/common/manifest.bundle.js"></script><script type="text/javascript" src="/common/chunk-vendors.bundle.js"></script><script type="text/javascript" src="/common/index.bundle.js"></script></body> | ||
</html> |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file not shown.
Oops, something went wrong.