posthtml-web-component icon indicating copy to clipboard operation
posthtml-web-component copied to clipboard

LinkImport didn't work

Open zhouwenbin opened this issue 9 years ago • 4 comments

I use gulp-posthtml to transform,if add <link rel="import" href="filename.html">,the html file can not be transformed.

zhouwenbin avatar Dec 15 '15 08:12 zhouwenbin

+1. Using gulp-posthtml too.

At first, I accepted an error like that: The base uri is need in options

There's no information about 'baseURI' option in README, but I found you wrote it in example/jadeWithPostHTML.js.

{
  hostURI:path
}

So I also added the option like above, then causes another error: Cannot read property 'attrs' of undefined

It may depends on PostHTML's 'node', but your codes seems to define correclty in src/index.js. So... I also don't know what the problem is ;-P

Anyway, posthtml-web-componet depends on older PostHTML, so just check the version and your codes please. Thanks!

seamile4kairi avatar Jan 27 '16 14:01 seamile4kairi

let me check it

island205 avatar Jan 27 '16 14:01 island205

I find the problem, please check https://github.com/posthtml/gulp-posthtml/pull/2 an my gulp-posthtml demo https://github.com/island205/posthtml-web-component/tree/master/gulp-test

island205 avatar Jan 27 '16 16:01 island205

Hi All! What result is expected? Create mocha test for this case, please...

voischev avatar Jan 28 '16 20:01 voischev