Skip to content
This repository has been archived by the owner on Jan 18, 2022. It is now read-only.

import statments inside <script> tag is failed to be resolved when re-building by watch mode #234

Closed
nandin-borjigin opened this issue Sep 18, 2018 · 2 comments

Comments

@nandin-borjigin
Copy link

Expected behavior

import statments inside the SFC <script> area should be correctly resolved during a rollup rebuild triggered by the rollup-watch

Actual behavior

import statments inside SFC <script> area is failed to be resolved.

Steps to reproduce the behavior

  1. use the cookbook/minimal example as the base.
  2. add any valid import statement in the <script> area of MyComponent.vue
    let's say that the package imported is called my-package and assume that it is correctly installed inside node_modules.
  3. run npx rollup -c -w
  4. it succeeds
  5. make any trivial but valid chagnes to the MyComponent.vue and SAVE it
  6. rollup rebuilds the example but fails with Error: Could not load my-package (imported by /path/to/the/example/MyComponent.vue?rollup-plugin-vue=script.js): ENOENT: no such file or directory, open 'my-package'
@nandin-borjigin nandin-borjigin changed the title cant resolve imports inside <script> tag when re-building by watch mode import statments inside <script> tag is failed to be resolved when re-building by watch mode Sep 18, 2018
@znck
Copy link
Member

znck commented Sep 22, 2018

It seems this problem is existing with rollup itself. rollup/rollup#982

Though, I'm trying to find the root cause.

@znck
Copy link
Member

znck commented Jan 14, 2019

Closing in favour of similar issue #238

@znck znck closed this as completed Jan 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants