Schum123 / svelte-loading-spinners

A collection of loading spinner components for SvelteJs
https://schum123.github.io/svelte-loading-spinners/
MIT License
511 stars 35 forks source link

import error: process is not defined #1

Closed hakanertug closed 4 years ago

hakanertug commented 4 years ago

Hi,

import { Jumper } from 'svelte-loading-spinners'

i add import code to my page i get this error on console.

image

How can i solve this problem? thanks.

Schum123 commented 4 years ago

Hello @hakanertug,

I'm not sure why that is happening.

try to add @rollup/plugin-replace

and in your rollup.config.js add,

import replace from '@rollup/plugin-replace';

plugins: [
    replace({
      "process.env.NODE_ENV": process.env.NODE_ENV,
    }),
    svelte({
      ...
    })
]
hakanertug commented 4 years ago

woww! Thank's it's work...

quantuminformation commented 4 years ago

I get the same error, I am not wanting to change my rollup config as it shouldn't be necessary

samuelstroschein commented 4 years ago

I also get the same error and agree with @quantuminfirmation although the posted solution works.

r-barreto commented 4 years ago

I'm getting the same error

quantuminformation commented 4 years ago

The problem is the word process is replaced everywhere in the source.

quantuminformation commented 4 years ago

see https://github.com/rollup/rollup/issues/3650#issuecomment-652787487

Schum123 commented 4 years ago

With latest version i hope this is not an issue anymore with emotion removed as dependency.