Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dbgame-build
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
wildfirecode13
dbgame-build
Commits
049a8d2b
Commit
049a8d2b
authored
Sep 07, 2018
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
486eb7bb
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
16 deletions
+9
-16
dev-server.js
build/dev-server.js
+6
-15
webpack.base.conf.js
build/webpack.base.conf.js
+3
-1
No files found.
build/dev-server.js
View file @
049a8d2b
...
@@ -9,21 +9,12 @@ var serverStart = opts => {
...
@@ -9,21 +9,12 @@ var serverStart = opts => {
let
webpackConfig
=
devConfig
(
opts
);
let
webpackConfig
=
devConfig
(
opts
);
// 遍历每个entry,加入dev-server client
// 遍历每个entry,加入dev-server client
// Object.keys(webpackConfig.entry).forEach(function (name) {
Object
.
keys
(
webpackConfig
.
entry
).
forEach
(
function
(
name
)
{
// let _devServer = `webpack-dev-server/client?http://localhost:${
// opts.devPort
// }`;
// webpackConfig.entry[name] = [_devServer].concat(webpackConfig.entry[name]);
// });
// 遍历每个entry,加入dev-server client
let
_devServer
=
`webpack-dev-server/client?http://localhost:
${
let
_devServer
=
`webpack-dev-server/client?http://localhost:
${
opts
.
devPort
opts
.
devPort
}
`
;
}
`
;
webpackConfig
.
entry
=
[
_devServer
].
concat
(
webpackConfig
.
entry
);
webpackConfig
.
entry
[
name
]
=
[
_devServer
].
concat
(
webpackConfig
.
entry
[
name
]);
});
var
compiler
=
webpack
(
webpackConfig
);
var
compiler
=
webpack
(
webpackConfig
);
...
...
build/webpack.base.conf.js
View file @
049a8d2b
...
@@ -2,10 +2,12 @@ const path = require('path');
...
@@ -2,10 +2,12 @@ const path = require('path');
module
.
exports
=
opts
=>
{
module
.
exports
=
opts
=>
{
const
result
=
{
const
result
=
{
entry
:
`./
${
opts
.
BUILD_SKIN
}
/src/Main.ts`
,
// entry: {
// entry: {
// app: path.join(opts.BUILD_SKIN, '/src/Main.ts')
// app: path.join(opts.BUILD_SKIN, '/src/Main.ts')
// },
// },
entry
:
{
app
:
`./
${
opts
.
BUILD_SKIN
}
/src/Main.ts`
},
module
:
{
module
:
{
rules
:
[
rules
:
[
{
{
...
...
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