Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
V
vue-cli-plugin-ts-multi-pages
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
shangbj
vue-cli-plugin-ts-multi-pages
Commits
6fddd9ba
Commit
6fddd9ba
authored
Mar 15, 2021
by
尚斌杰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复html-webpack-plugin bug
parent
eb5fec9e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
10 deletions
+10
-10
build.js
commands/build.js
+5
-5
serve.js
commands/serve.js
+4
-4
package.json
package.json
+1
-1
No files found.
commands/build.js
View file @
6fddd9ba
...
@@ -219,11 +219,11 @@ async function build (args, api, options) {
...
@@ -219,11 +219,11 @@ async function build (args, api, options) {
webpackConfig
.
output
.
publicPath
=
''
webpackConfig
.
output
.
publicPath
=
''
webpackConfig
.
output
.
path
=
targetDir
webpackConfig
.
output
.
path
=
targetDir
for
(
let
item
of
webpackConfig
.
plugins
)
{
for
(
let
item
of
webpackConfig
.
plugins
)
{
if
(
item
.
options
&&
item
.
o
ptions
.
template
)
{
if
(
item
.
userOptions
&&
item
.
userO
ptions
.
template
)
{
item
.
o
ptions
.
template
=
pagePath
+
'/index.html'
item
.
userO
ptions
.
template
=
pagePath
+
'/index.html'
item
.
o
ptions
.
header
=
headerTpl
item
.
userO
ptions
.
header
=
headerTpl
item
.
o
ptions
.
footer
=
footerTpl
item
.
userO
ptions
.
footer
=
footerTpl
item
.
o
ptions
.
common
=
(
commonPath
&&
process
.
env
.
NODE_ENV
===
'production'
)?
`<link href=
${
commonPath
}
rel=preload as=script><script src="
${
commonPath
}
"></script>`
:
''
item
.
userO
ptions
.
common
=
(
commonPath
&&
process
.
env
.
NODE_ENV
===
'production'
)?
`<link href=
${
commonPath
}
rel=preload as=script><script src="
${
commonPath
}
"></script>`
:
''
}
}
}
}
for
(
let
item
of
webpackConfig
.
module
.
rules
)
{
for
(
let
item
of
webpackConfig
.
module
.
rules
)
{
...
...
commands/serve.js
View file @
6fddd9ba
...
@@ -113,10 +113,10 @@ module.exports = (api, options) => {
...
@@ -113,10 +113,10 @@ module.exports = (api, options) => {
app
:
pagePath
+
'/index'
app
:
pagePath
+
'/index'
}
}
for
(
let
item
of
webpackConfig
.
plugins
)
{
for
(
let
item
of
webpackConfig
.
plugins
)
{
if
(
item
.
options
&&
item
.
o
ptions
.
template
)
{
if
(
item
.
userOptions
&&
item
.
userO
ptions
.
template
)
{
item
.
o
ptions
.
template
=
pagePath
+
'/index.html'
item
.
userO
ptions
.
template
=
pagePath
+
'/index.html'
item
.
o
ptions
.
header
=
headerTpl
item
.
userO
ptions
.
header
=
headerTpl
item
.
o
ptions
.
footer
=
footerTpl
item
.
userO
ptions
.
footer
=
footerTpl
}
}
}
}
}
else
{
}
else
{
...
...
package.json
View file @
6fddd9ba
{
{
"name"
:
"vue-cli-plugin-ts-multi-pages"
,
"name"
:
"vue-cli-plugin-ts-multi-pages"
,
"version"
:
"2.0.0-alpha.
0
"
,
"version"
:
"2.0.0-alpha.
1
"
,
"description"
:
"vue-cli3多页开发插件TS版"
,
"description"
:
"vue-cli3多页开发插件TS版"
,
"main"
:
"index.js"
,
"main"
:
"index.js"
,
"scripts"
:
{
"scripts"
:
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment