Skip to content

Commit 7863a00

Browse files
committed
✨ udpate
1 parent d6cbbd5 commit 7863a00

File tree

4 files changed

+12
-11
lines changed

4 files changed

+12
-11
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"name": "Zyao89",
3535
"email": "[email protected]"
3636
},
37-
"license": "ISC",
37+
"license": "MIT",
3838
"devDependencies": {
3939
"@types/jest": "^24.0.18",
4040
"babel-eslint": "^10.0.2",
@@ -45,7 +45,7 @@
4545
"webpack": "^4.39.2"
4646
},
4747
"dependencies": {
48-
"@micro-app/core": "^0.1.1-rc.3",
48+
"@micro-app/core": "^0.1.1-rc.4",
4949
"koa": "^2.8.1",
5050
"koa-static": "^5.0.0",
5151
"opn": "^5.5.0",

src/adapter/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const _ = require('lodash');
77
module.exports = function adapter(api, { type, isDev, progress }) {
88
const logger = api.logger;
99
let _webpackConfig = api.getState('webpackConfig');
10-
let _webpackDevOptions = {};
10+
let _webpackDevOptions = _webpackConfig.devServer || {};
1111

1212
if (type === 'vusion') {
1313
const vusionAdapter = require('./vusion')(_webpackConfig, isDev, {

src/server/createServer.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,11 @@ module.exports = function(opts = {}, api) {
5656
app.use(koaWebpackMiddleware.devMiddleware(compiler, devOptions));
5757
app.use(koaWebpackMiddleware.hotMiddleware(compiler, devOptions));
5858
}
59-
} else {
60-
// static file
61-
const { contentBase, options = {} } = serverConfig;
62-
const staticOptions = api.applyPluginHooks('modifyStaticServerOptions', { options });
59+
}
60+
// static file
61+
const { contentBase, options = {} } = serverConfig;
62+
const staticOptions = api.applyPluginHooks('modifyStaticServerOptions', options) || {};
63+
if (staticOptions.disabled !== true) {
6364
const koaStatic = staticServer(contentBase, staticOptions);
6465
if (koaStatic) {
6566
if (opts.type === 'vusion') {

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -379,10 +379,10 @@
379379
"@types/istanbul-reports" "^1.1.1"
380380
"@types/yargs" "^13.0.0"
381381

382-
"@micro-app/core@^0.1.1-rc.3":
383-
version "0.1.1-rc.3"
384-
resolved "https://registry.yarnpkg.com/@micro-app/core/-/core-0.1.1-rc.3.tgz#724aeb1e9df601ee55a705e832c3530ddf08da0e"
385-
integrity sha512-hCphfir+E+fxNtvIRZK7tD4JNHj6W/nfKVvJz6qeOJbRuZ1fGq88S8lxw461yp8QxNtLkJw1A7lXY/bBLzL0fQ==
382+
"@micro-app/core@^0.1.1-rc.4":
383+
version "0.1.1-rc.4"
384+
resolved "https://registry.yarnpkg.com/@micro-app/core/-/core-0.1.1-rc.4.tgz#ac1e8ca9b0d3411ee795cb2a4118c90a8d9f4870"
385+
integrity sha512-yAZFPBnNC++cX7pX9fi7Xg1k6wPjC3nG+irWckbfaJYPrl5PWDptNPYs+fZIzYUmcBP5L54wVeecvHwEyjOJwA==
386386
dependencies:
387387
ajv "^6.10.2"
388388
ajv-keywords "^3.4.1"

0 commit comments

Comments
 (0)