@web/dev-server-rollup
Advanced tools
Comparing version 0.1.4 to 0.1.5
# @web/dev-server-rollup | ||
## 0.1.5 | ||
### Patch Changes | ||
- 6bc4381: handle windows paths in @web/dev-server-rolup | ||
## 0.1.4 | ||
@@ -4,0 +10,0 @@ |
@@ -60,7 +60,7 @@ "use strict"; | ||
// we need to rewrite it to a browser path | ||
const injectedFilePath = transformedFiles.has(context.path) && source.startsWith(rootDir); | ||
const injectedFilePath = path_1.default.normalize(source).startsWith(rootDir); | ||
if (!injectedFilePath && !rollupPlugin.resolveId) { | ||
return; | ||
} | ||
if (whatwg_url_1.default.parseURL(source) != null) { | ||
if (!injectedFilePath && whatwg_url_1.default.parseURL(source) != null) { | ||
// don't resolve valid urls | ||
@@ -112,3 +112,3 @@ return source; | ||
} | ||
if (!resolvedImportPath.startsWith(rootDir)) { | ||
if (!path_1.default.normalize(resolvedImportPath).startsWith(rootDir)) { | ||
throw new dev_server_core_1.PluginError(chalk_1.red(`Resolved an import to ${chalk_1.yellow(resolvedImportPath)}`) + | ||
@@ -115,0 +115,0 @@ chalk_1.red('. This path is not reachable from the browser because') + |
{ | ||
"name": "@web/dev-server-rollup", | ||
"version": "0.1.4", | ||
"version": "0.1.5", | ||
"publishConfig": { | ||
@@ -5,0 +5,0 @@ "access": "public" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
40525