Polymer / tools

Polymer Tools Monorepo
BSD 3-Clause "New" or "Revised" License
430 stars 200 forks source link

polymer serve --npm compiled with wrong require path #2535

Open baocang opened 6 years ago

baocang commented 6 years ago

Description

Versions & Environment

Steps to Reproduce

  1. Create an application project: polymer init polymer-2-application named polymer-demo
  2. Named shell as demo-app
  3. Move script to demo-app.js with es6 syntax
  4. Add script tag to demo-app.html: <script type="module" src="./demo-app.js"></script>
  5. Run with polymer serve --npm --open --open-path / --compile always

Expected Results

No error is throw and load demo-app.js from http://127.0.0.1:8081/src/demo-app/demo-app.js

Actual Results

Error is thrown and load demo-app.js from http://127.0.0.1:8081/demo-app.js with 404 Not found

usergenic commented 6 years ago

@baocang to be clear are you talking about moving the contents of the existing script tag (i.e. the class definition) out of the script tag, which is inside a dom-module tag, and pasting it as is into demo-app.js then trying to import it as a module?

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.