This repository has been archived by the owner. 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

Comments

Projects
None yet
4 participants
@breadadams

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)
@reaysawa

This comment has been minimized.

Show comment
Hide comment
@reaysawa

reaysawa 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.

reaysawa 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

This comment has been minimized.

Show comment
Hide comment
@p2yang

p2yang Jan 26, 2018

Stylus has the same problem.

p2yang commented Jan 26, 2018

Stylus has the same problem.

@BoltDoggy BoltDoggy added the feature label Feb 18, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.