Skip to content

Commit

Permalink
js and css files in html head are treated like resources (not touched…
Browse files Browse the repository at this point in the history
… just copied to output dir).
  • Loading branch information
Bobris committed Aug 29, 2019
1 parent f4b98d0 commit cbf20c4
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## [unreleased]

### Fixed

- js and css files in html head are treated like resources (not touched just copied to output dir).

## 0.91.3

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion Lib/TSCompiler/BuildModuleCtx.cs
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ public string ExpandHtmlHead(string htmlHead)
(Match m) =>
{
var info = AutodetectAndAddDependency(
PathUtils.Join(Owner.Owner.FullPath, m.Value.Substring(2, m.Length - 4)));
PathUtils.Join(Owner.Owner.FullPath, m.Value.Substring(2, m.Length - 4)), true);
if (info == null)
{
Owner.Logger.Error("HtmlHead in package.json missing dependency " + m.Value.Substring(2, m.Length - 4));
Expand Down
5 changes: 4 additions & 1 deletion TestProjects/Sandbox/piskoviste/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@
},
"author": "",
"license": "ISC",
"bobril": {
"head": "<script src=\"<<../temp/jshead.js>>\"></script>"
},
"dependencies": {
"bobril": "*"
}
}
}
7 changes: 2 additions & 5 deletions TestProjects/Sandbox/piskoviste/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"compilerOptions": {
"allowJs": false,
"checkJs": false,
"declaration": true,
"declaration": false,
"experimentalDecorators": true,
"jsx": "react",
"lib": [
Expand All @@ -18,15 +18,12 @@
"preserveConstEnums": false,
"reactNamespace": "b",
"removeComments": false,
"skipLibCheck": true,
"skipLibCheck": false,
"skipDefaultLibCheck": true,
"sourceMap": true,
"target": "es5",
"resolveJsonModule": true
},
"files": [
"node_modules/bobril/jsx.d.ts"
],
"include": [
"**/*"
]
Expand Down
1 change: 1 addition & 0 deletions TestProjects/Sandbox/temp/jshead.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
console.log("From Asset");

0 comments on commit cbf20c4

Please sign in to comment.