@11ty/eleventy-dev-server
Advanced tools
Comparing version 1.0.0-canary.3 to 1.0.0-canary.4
{ | ||
"name": "@11ty/eleventy-dev-server", | ||
"version": "1.0.0-canary.3", | ||
"version": "1.0.0-canary.4", | ||
"description": "A minimal, modern, generic, hot-reloading local web server to help web developers.", | ||
@@ -5,0 +5,0 @@ "main": "server.js", |
@@ -25,2 +25,3 @@ const pkg = require("./package.json"); | ||
showVersion: false, // Whether or not to show the server version on the command line. | ||
encoding: "utf-8", // Default file encoding | ||
@@ -185,3 +186,3 @@ pathPrefix: "/", // May be overridden by Eleventy, adds a virtual base directory to your project | ||
let contents = fs.readFileSync(filepath, { | ||
encoding: "utf8", | ||
encoding: this.options.encoding, | ||
}); | ||
@@ -268,3 +269,3 @@ if(useCache) { | ||
if (mimeType === "text/html") { | ||
res.setHeader("Content-Type", mimeType); | ||
res.setHeader("Content-Type", `text/html; charset=${this.options.encoding}`); | ||
// the string is important here, wrapResponse expects strings internally for HTML content (for now) | ||
@@ -271,0 +272,0 @@ return res.end(contents.toString()); |
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
26013
663