Skip to content

Commit

Permalink
Fix for rollup replace plugin warning (#210)
Browse files Browse the repository at this point in the history
sveltejs/sapper-template#302
https://github.com/rollup/plugins/tree/master/packages/replace#preventassignment

```sh
Plugin replace: @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`.
```
  • Loading branch information
tylersayshi authored Nov 12, 2021
1 parent 12ecd36 commit b61aa14
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/rollup/getRollupConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export function createBrowserConfig({
const toReplace = {
'process.env.componentType': "'browser'",
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV),
preventAssignment: true,
...replacements,
};

Expand Down

1 comment on commit b61aa14

@gashie
Copy link

@gashie gashie commented on b61aa14 Jan 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this fixed my issue

Please sign in to comment.