We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm using this in rollup.config.js:
rollup.config.js
import replace from 'rollup-plugin-replace'; ... const isProd = process.env.NODE_ENV === 'production'; ... replace({ IS_PRODUCTION: isProd, }),
and in my Svelte code like this ():
{#if !IS_PRODUCTION && failure} <p>{failure}</p> {/if}
It works!
But I get an annoying warning in console during compilation:
(!) Plugin svelte: 'IS_PRODUCTION' is not defined src\Router.svelte 101: {/if} 102: 103: {#if !IS_PRODUCTION && failure}
How to fix it?
The text was updated successfully, but these errors were encountered:
Use the onwarn option to rollup-plugin-svelte to selectively suppress warnings. https://github.com/sveltejs/rollup-plugin-svelte#usage
onwarn
Sorry, something went wrong.
There is no way to use comments instead?
Like eslint: /* global IS_PRODUCTION */?
/* global IS_PRODUCTION */
<Component> was created with unknown prop
No branches or pull requests
I'm using this in
rollup.config.js
:and in my Svelte code like this ():
It works!
But I get an annoying warning in console during compilation:
How to fix it?
The text was updated successfully, but these errors were encountered: