sveltejs / sapper-template

Starter template for Sapper apps
703 stars 214 forks source link

fix: Rollup replace plugin warnings #304

Closed veritem closed 3 years ago

veritem commented 3 years ago

When starting a new sapper app with with rollup using this template you encounter a warning line

@rollup/plugin-replace: 'preventAssignment' currently defaults to false. It is recommended to set this option to `true`, as the next major version will default this option to `true`.

I'm open this PR to fix it

veritem commented 3 years ago

@Conduitry I think it's already there you can see

image

benmccann commented 3 years ago

This was added in https://github.com/rollup/plugins/pull/798, so ^2.4.0

veritem commented 3 years ago

Done cc @Conduitry @antony

benmccann commented 3 years ago

Shouldn't 'process.env.NODE_ENV' also be in values?

veritem commented 3 years ago

I think no @benmccann

antony commented 3 years ago

I think no @benmccann

Yeah, it absolutely should. It's a replacement value. There are only two possible config options.

benmccann commented 3 years ago

I think no @benmccann

If it shouldn't, can you provide some explanation as to why not?

veritem commented 3 years ago

I think no @benmccann

If it shouldn't, can you provide some explanation as to why not?

I wasn't aware @benmccann but fixed