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
4b362fdd
Commit
4b362fdd
authored
Jul 09, 2020
by
shangbinjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
277e0ca2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
build.js
commands/build.js
+3
-3
package.json
package.json
+1
-1
No files found.
commands/build.js
View file @
4b362fdd
...
@@ -206,7 +206,7 @@ async function build (args, api, options) {
...
@@ -206,7 +206,7 @@ async function build (args, api, options) {
const
pagePath
=
"./src/pages/"
+
entry
const
pagePath
=
"./src/pages/"
+
entry
webpackConfig
.
entry
=
{}
webpackConfig
.
entry
=
{}
webpackConfig
.
entry
[
entry
]
=
pagePath
+
'/index.ts'
webpackConfig
.
entry
[
entry
]
=
pagePath
+
'/index.ts'
//
const curPublicPath = webpackConfig.output.publicPath
const
curPublicPath
=
webpackConfig
.
output
.
publicPath
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
)
{
...
@@ -221,8 +221,8 @@ async function build (args, api, options) {
...
@@ -221,8 +221,8 @@ async function build (args, api, options) {
if
(
item
.
test
.
toString
().
indexOf
(
'png|jp'
)
>=
0
){
if
(
item
.
test
.
toString
().
indexOf
(
'png|jp'
)
>=
0
){
for
(
const
itemChild
of
item
.
use
)
{
for
(
const
itemChild
of
item
.
use
)
{
if
(
itemChild
.
options
){
if
(
itemChild
.
options
){
itemChild
.
options
.
publicPath
=
'../'
//
itemChild.options.publicPath = '../'
//
itemChild.options.publicPath = curPublicPath?curPublicPath.indexOf(entry)<0?curPublicPath+entry:curPublicPath:'/'+entry
itemChild
.
options
.
publicPath
=
curPublicPath
?
curPublicPath
.
indexOf
(
entry
)
<
0
?
curPublicPath
+
entry
:
curPublicPath
:
'/'
+
entry
break
break
}
}
}
}
...
...
package.json
View file @
4b362fdd
{
{
"name"
:
"vue-cli-plugin-ts-multi-pages"
,
"name"
:
"vue-cli-plugin-ts-multi-pages"
,
"version"
:
"1.2.
2
"
,
"version"
:
"1.2.
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