sveltejs / svelte-hmr

HMR commons for Svelte 3
ISC License
203 stars 20 forks source link

native support breaks with empty components #9

Open halfnelson opened 4 years ago

halfnelson commented 4 years ago
System.err: TypeError: Cannot create property 'm' on boolean 'false'

for a component

<script>
  export let prop
</script>

see https://github.com/halfnelson/svelte-native/issues/123

rixo commented 2 years ago

Do you know if that's still the case in Svelte Native?

pasevin commented 1 year ago

I'm having the same issue but with my regular svelte project. Using:

Config:

...
 use: {
          loader: 'svelte-loader',
          options: {
            emitCss: true,
            hotReload: !prodMode,
            preprocess: sveltePreprocess({
              typescript: {
                tsConfigFile: './tsconfig.json',
              },
            }),
          },
        },
...

I could just use empty html tag in the component, but maybe there is a different solution?

rixo commented 1 year ago

@pasevin Can you confirm that you have compiler's dev option to true when this happens?