Skip to content
This repository has been archived by the owner on Jun 3, 2018. It is now read-only.

Hot-reload/compile not working with single file components #18

Open
breadadams opened this issue Jan 20, 2018 · 2 comments
Open

Hot-reload/compile not working with single file components #18

breadadams opened this issue Jan 20, 2018 · 2 comments
Labels

Comments

@breadadams
Copy link

breadadams commented Jan 20, 2018

Using a single file component, with src attributes on <template> & <style> eg.

SomeComponent.vue:

<template src="./button.html" />
<style lang="scss" scoped src="./button.scss" />

Changes made to either of those files respectivly, doesn't cause any recompiling of Parcel. I have to go into SomeComponent.vue and re-save that file for it to compile.

Software Version(s)
parcel-plugin-vue ^1.5.0
Parcel ^1.4.1
Vue ^2.5.13
Node 8.1.2
npm/Yarn 1.3.2 (Yarn)
Operating System MacOs Sierra (10.12.6)
@resolritter
Copy link

resolritter commented Jan 24, 2018

I investigated this quite a bit since yesterday as it is the same for LESS or any other included files.

The problem seems to happen because the referenced files aren't being recognized as implicit component dependencies in the assets pipeline, and thus do not trigger the parent's (Vue file) recompilation.

img

Luckily we have access to the delegate property (from the constructor's options) so it could probably be resolved without messing with Parcel's source code.

@p2yang
Copy link

p2yang commented Jan 26, 2018

Stylus has the same problem.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants