Polymer / vscode-plugin

Provides autocompletion, linting, and more for web components.
Other
74 stars 11 forks source link

Set baseUrl to read imports from #81

Open madeleineostoja opened 6 years ago

madeleineostoja commented 6 years ago

Not sure if I'm just missing a config option somewhere, but is there a way to set a base path for Polymer IDE to read from, or (better) for it to respect the compilerOptions.baseUrl param in jsconfig.json/tsconfig.json?

Use case:

If you build your project to a dist folder, your imports would look something like

<link rel="import" href="/bower_components/polymer/polymer-element.html">
<link rel="import" href="/components/some-component.html">

But their physical paths would map to /[project]/dist/... rather than [project]/.... So your console gets flooded with 404 errors from Polymer IDE.

SirMcPotato commented 6 years ago

Yep, totally agree.
Here, we use some Polymer components backed up by a Symfony 3 application, all of that on a local network based webdev server :. [polymer-ide] Unable to load import: ENOENT: no such file or directory, open '\\webdev-serv\www\potato\sf3-projectl\bower_components\iron-icons\editor-icons.html'

URL should be \\webdev-serv\www\potato\sf3-projectl\web\bower_components\iron-icons\editor-icons.html