Skip to content

Commit b6afd8a

Browse files
committed
Fixed ExtensionReloader production warning
1 parent 9e59a97 commit b6afd8a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ const { exec } = require('child_process')
44
const logger = require('@vue/cli-shared-utils')
55
const webpack = require('webpack')
66
const CopyWebpackPlugin = require('copy-webpack-plugin')
7+
const ExtensionReloader = require('webpack-extension-reloader')
78
const ZipPlugin = require('zip-webpack-plugin')
89
const defaultOptions = {
910
components: {},
@@ -156,7 +157,8 @@ module.exports = (api, options) => {
156157
if (pluginOptions.components.contentScripts) {
157158
entries.contentScript = Object.keys(componentOptions.contentScripts.entries)
158159
}
159-
const ExtensionReloader = require('webpack-extension-reloader')
160-
webpackConfig.plugins.push(new ExtensionReloader({ entries }))
160+
if (!isProduction) {
161+
webpackConfig.plugins.push(new ExtensionReloader({ entries }))
162+
}
161163
})
162164
}

0 commit comments

Comments
 (0)