d-lowl / chrome-extension-svelte-boilerplate

MIT License
116 stars 18 forks source link

Svelte component import not working #2

Closed NasirKhalid24 closed 5 years ago

NasirKhalid24 commented 5 years ago

This problem was first referenced in #1 . Currently if a component is imported in to a svelte file there is no popup in development mode. Only when a complete production build is created does it work. For example, currently in my Popup.svelte I have added the following line in the script tag

import Bar from './Bar.svelte';

and in Bar.svelte I have only the following line

<h2>Hello Again</h2>

When I run the development server I get the following popup. Screen Shot 2019-07-18 at 2 20 18 PM

When the console for the popup is opened it shows the following errors

Screen Shot 2019-07-18 at 2 15 20 PM

However if instead you run 'npm run build' the extension then displays as required

Screen Shot 2019-07-18 at 2 22 01 PM

NasirKhalid24 commented 5 years ago

Fixed now #3

d-lowl commented 5 years ago

Thanks for the help @NasirKhalid24, merged.