Skip to content

Commit cb12442

Browse files
authored
Merge pull request #5 from MicrosApp/develop
Develop
2 parents 84f5d19 + 5007aab commit cb12442

File tree

5 files changed

+14
-13
lines changed

5 files changed

+14
-13
lines changed

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@micro-app/cli",
3-
"version": "0.1.1-rc.1",
3+
"version": "0.1.1-rc.3",
44
"description": "[CLI] Pluggable micro application framework.",
55
"bin": {
66
"micro-app": "./bin/micro-app.js",
@@ -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.5",
4949
"koa": "^2.8.1",
5050
"koa-static": "^5.0.0",
5151
"opn": "^5.5.0",

plugins/commands/serve/runServe.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ module.exports = function runServe(api, isDev, { type, onlyNode, progress, port,
1515
port, host,
1616
};
1717

18-
if (isDev) {
18+
if (isDev && !onlyNode) {
1919
const { compiler, devOptions, webpackConfig } = webpackAdapter(api, { type, isDev, progress });
2020

2121
startInfo.compiler = compiler;

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.5":
383+
version "0.1.1-rc.5"
384+
resolved "https://registry.yarnpkg.com/@micro-app/core/-/core-0.1.1-rc.5.tgz#0a9167aca0b6583e62c7837950c228b6af2c82f7"
385+
integrity sha512-p7cxoWpq/ji8qW3TFPiwJm1U8NHQ37fcChHLv0aQCVuQLYBvlSvhCSTY8wQPJRxr1J1vlopat+0h52I8w4HRZg==
386386
dependencies:
387387
ajv "^6.10.2"
388388
ajv-keywords "^3.4.1"

0 commit comments

Comments
 (0)