0

Does anyone know how to get Polymer 3 running with Visual Studio?

I have completed a demo using the polyserve development server. However, I cannot get the same code to work in Visual Studio. I would not think it would depend on the hosting environment.

I created a polymer element using these instructions: https://www.polymer-project.org/3.0/start/first-element/intro

It works as expected. When I move the code to visual studio I get:

Failed to resolve module specifier '@polymer/polymer/polymer-element.js'

I have noticed that when I run polyserve I get 64 requests for this page. When I do it in Visual Studio I get 3 - my html, webcomponents-loader.js, and demo-element.js

Don Chambers
  • 3,798
  • 9
  • 33
  • 74

1 Answers1

0

It does not matter which editor you are using. I use VS Code only for polymer-3.x.

After you have installed polymer in your local, you can create your element using polymer CLI.

  • create a directory where you want to start your project and cd inside the directory
  • open the terminal at this location and type the following polymer cli commands
  • polymer init -> select polymer-3-element, this creates your hello world element
  • polymer serve starts server. you can view your element http://localhost:8080
Raj
  • 1,100
  • 3
  • 20
  • 33