Skip to content

Commit

Permalink
fix(webpack-box): 修改 dev 跟 build 多页面指令错误
Browse files Browse the repository at this point in the history
  • Loading branch information
罗学 committed Apr 1, 2021
1 parent 4956fd4 commit edab8a7
Show file tree
Hide file tree
Showing 46 changed files with 33,914 additions and 845 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [1.0.9](https://github.com/luoxue-victor/learn_webpack/compare/v1.3.3...v1.0.9) (2021-03-31)
## [1.0.9](https://github.com/luoxue-victor/learn_webpack/compare/v1.3.3...v1.0.9) (2021-04-01)

### 🌟 新功能
范围|描述|commitId
Expand All @@ -10,6 +10,7 @@
范围|描述|commitId
--|--|--
readme | lesson is open | [8f48fdd](https://github.com/luoxue-victor/learn_webpack/commit/8f48fdd)
readme | 修改文档 | [4956fd4](https://github.com/luoxue-victor/learn_webpack/commit/4956fd4)

## [1.3.3](https://github.com/luoxue-victor/learn_webpack/compare/v1.3.2...v1.3.3) (2020-12-25)

Expand Down
31 changes: 16 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,22 @@ module.exports = function (config) {
* @param {Boolean} mock 开启 mock
*/
return {
entry: 'src/main.js',
output: 'dist',
publicPath: '/common/',
pages: {
index: {
entry: 'src/main.js',
template: 'public/index.html',
filename: 'index.html',
publicPath: './',
output: 'dist1'
},
index2: {
entry: 'src/main.js',
template: 'public/index2.html',
filename: 'index2.html',
publicPath: './',
output: 'dist2'
}
},
port: 9001,
mock: true,
env: {
Expand Down Expand Up @@ -320,18 +333,6 @@ module.exports = function (config) {
// dll: {
// venders: ['react']
// },
pages: {
index: {
entry: 'src/main.js',
template: 'public/index.html',
filename: 'index.html'
},
index2: {
entry: 'src/main.js',
template: 'public/index2.html',
filename: 'index2.html'
}
},
chainWebpack(config) {}
}
}
Expand Down
31 changes: 16 additions & 15 deletions box.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,22 @@ module.exports = function (config) {
* @param {Boolean} mock 开启 mock
*/
return {
entry: 'src/main.js',
output: 'dist',
publicPath: '/common/',
pages: {
index: {
entry: 'src/main.js',
template: 'public/index.html',
filename: 'index.html',
publicPath: './',
output: 'dist1'
},
index2: {
entry: 'src/main.js',
template: 'public/index2.html',
filename: 'index2.html',
publicPath: './',
output: 'dist2'
}
},
port: 9001,
mock: true,
env: {
Expand Down Expand Up @@ -78,18 +91,6 @@ module.exports = function (config) {
// dll: {
// venders: ['react']
// },
pages: {
index: {
entry: 'src/main.js',
template: 'public/index.html',
filename: 'index.html'
},
index2: {
entry: 'src/main.js',
template: 'public/index2.html',
filename: 'index2.html'
}
},
chainWebpack(config) {}
}
}
59 changes: 59 additions & 0 deletions dist1/index/css/index.980a8b35.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist1/index/css/index.980a8b35.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions dist1/index/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!DOCTYPE html>
<html><head><link href="./css/index.980a8b35.css" rel="stylesheet"><link as="style" href="./css/index.980a8b35.css" rel="preload"><link as="script" href="./js/chunk-vendors.d6c2323d.bundle.js" rel="preload"><link as="script" href="./js/index.ca998c67.bundle.js" rel="preload"><link as="script" href="./js/manifest.32f7c789.bundle.js" rel="preload"></head>
<head>
<meta charset="UTF-8">
<title>index page1</title>
<body>
<app id="app"></app>
<script src="./js/manifest.32f7c789.bundle.js"></script><script src="./js/chunk-vendors.d6c2323d.bundle.js"></script><script src="./js/index.ca998c67.bundle.js"></script></body>
</html>
Loading

0 comments on commit edab8a7

Please sign in to comment.