@web/dev-server-core
Advanced tools
Comparing version 0.2.19 to 0.3.0
# @web/dev-server-core | ||
## 0.3.0 | ||
### Minor Changes | ||
- 0f613e0e: handle modules resolved outside root dir | ||
## 0.2.19 | ||
@@ -4,0 +10,0 @@ |
@@ -8,3 +8,2 @@ "use strict"; | ||
const koa_etag_1 = __importDefault(require("koa-etag")); | ||
const koa_static_1 = __importDefault(require("koa-static")); | ||
const basePathMiddleware_1 = require("../middleware/basePathMiddleware"); | ||
@@ -18,2 +17,3 @@ const etagCacheMiddleware_1 = require("../middleware/etagCacheMiddleware"); | ||
const pluginFileParsedMiddleware_1 = require("../middleware/pluginFileParsedMiddleware"); | ||
const serveFilesMiddleware_1 = require("../middleware/serveFilesMiddleware"); | ||
/** | ||
@@ -54,12 +54,3 @@ * Creates middlewares based on the given configuration. The middlewares can be | ||
middlewares.push(pluginServeMiddleware_1.pluginServeMiddleware(logger, plugins)); | ||
// serve static files | ||
middlewares.push(koa_static_1.default(config.rootDir, { | ||
hidden: true, | ||
defer: true, | ||
brotli: false, | ||
gzip: false, | ||
setHeaders(res) { | ||
res.setHeader('cache-control', 'no-cache'); | ||
}, | ||
})); | ||
middlewares.push(...serveFilesMiddleware_1.serveFilesMiddleware(config.rootDir)); | ||
return middlewares; | ||
@@ -66,0 +57,0 @@ } |
{ | ||
"name": "@web/dev-server-core", | ||
"version": "0.2.19", | ||
"version": "0.3.0", | ||
"publishConfig": { | ||
@@ -70,2 +70,3 @@ "access": "public" | ||
"koa-etag": "^4.0.0", | ||
"koa-send": "^5.0.1", | ||
"koa-static": "^5.0.0", | ||
@@ -76,6 +77,8 @@ "lru-cache": "^6.0.0", | ||
"picomatch": "^2.2.2", | ||
"ws": "^7.4.0" | ||
"ws": "^7.4.1" | ||
}, | ||
"devDependencies": { | ||
"@types/clone": "^2.1.0", | ||
"@types/koa-etag": "^3.0.0", | ||
"@types/koa-static": "^4.0.1", | ||
"@types/lru-cache": "^5.1.0", | ||
@@ -87,4 +90,4 @@ "@types/parse5": "^5.0.3", | ||
"portfinder": "^1.0.28", | ||
"uuid": "^8.3.1" | ||
"uuid": "^8.3.2" | ||
} | ||
} |
import { Middleware } from 'koa'; | ||
import koaEtag from 'koa-etag'; | ||
import koaStatic from 'koa-static'; | ||
import { FSWatcher } from 'chokidar'; | ||
@@ -16,2 +15,3 @@ | ||
import { pluginFileParsedMiddleware } from '../middleware/pluginFileParsedMiddleware'; | ||
import { serveFilesMiddleware } from '../middleware/serveFilesMiddleware'; | ||
@@ -64,17 +64,5 @@ /** | ||
middlewares.push(pluginServeMiddleware(logger, plugins)); | ||
middlewares.push(...serveFilesMiddleware(config.rootDir)); | ||
// serve static files | ||
middlewares.push( | ||
koaStatic(config.rootDir, { | ||
hidden: true, | ||
defer: true, | ||
brotli: false, | ||
gzip: false, | ||
setHeaders(res) { | ||
res.setHeader('cache-control', 'no-cache'); | ||
}, | ||
}), | ||
); | ||
return middlewares; | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
279932
181
5265
1
18
10
+ Addedkoa-send@^5.0.1
Updatedws@^7.4.1