diff --git a/packages/replace/src/index.js b/packages/replace/src/index.js index 48f624ad8..5d0427769 100755 --- a/packages/replace/src/index.js +++ b/packages/replace/src/index.js @@ -25,6 +25,7 @@ function getReplacements(options) { delete values.sourcemap; delete values.sourceMap; delete values.objectGuards; + delete values.preventAssignment; return values; } diff --git a/packages/replace/test/fixtures/form/observe-plugin-options/_config.js b/packages/replace/test/fixtures/form/observe-plugin-options/_config.js index 5d1b7ba76..f472fef74 100755 --- a/packages/replace/test/fixtures/form/observe-plugin-options/_config.js +++ b/packages/replace/test/fixtures/form/observe-plugin-options/_config.js @@ -6,6 +6,7 @@ module.exports = { sourcemap: true, sourceMap: true, include: '**/input.js', - exclude: 'node_modules/**' + exclude: 'node_modules/**', + preventAssignment: false } }; diff --git a/packages/replace/test/fixtures/form/observe-plugin-options/input.js b/packages/replace/test/fixtures/form/observe-plugin-options/input.js index 58a951275..3c553f2cc 100755 --- a/packages/replace/test/fixtures/form/observe-plugin-options/input.js +++ b/packages/replace/test/fixtures/form/observe-plugin-options/input.js @@ -5,4 +5,5 @@ console.log(` sourceMap include exclude + preventAssignment `); diff --git a/packages/replace/test/fixtures/form/observe-plugin-options/output.js b/packages/replace/test/fixtures/form/observe-plugin-options/output.js index cbf28032f..df587965c 100755 --- a/packages/replace/test/fixtures/form/observe-plugin-options/output.js +++ b/packages/replace/test/fixtures/form/observe-plugin-options/output.js @@ -5,4 +5,5 @@ console.log(` sourceMap include exclude + preventAssignment `); diff --git a/packages/replace/test/snapshots/form.js.md b/packages/replace/test/snapshots/form.js.md index 014ff876f..e8b50f05c 100644 --- a/packages/replace/test/snapshots/form.js.md +++ b/packages/replace/test/snapshots/form.js.md @@ -37,6 +37,7 @@ Generated by [AVA](https://avajs.dev). sourceMap␊ include␊ exclude␊ + preventAssignment␊ \`);` ## process-check: Handles process type guards in replacements diff --git a/packages/replace/test/snapshots/form.js.snap b/packages/replace/test/snapshots/form.js.snap index 297ea1cd9..310c56eb3 100644 Binary files a/packages/replace/test/snapshots/form.js.snap and b/packages/replace/test/snapshots/form.js.snap differ diff --git a/packages/replace/test/snapshots/misc.js.snap b/packages/replace/test/snapshots/misc.js.snap index 73ae474b8..a62804a04 100644 Binary files a/packages/replace/test/snapshots/misc.js.snap and b/packages/replace/test/snapshots/misc.js.snap differ diff --git a/packages/replace/test/snapshots/sourcemaps.js.snap b/packages/replace/test/snapshots/sourcemaps.js.snap index 8771f7074..d6aa96543 100644 Binary files a/packages/replace/test/snapshots/sourcemaps.js.snap and b/packages/replace/test/snapshots/sourcemaps.js.snap differ