Skip to content

Commit 5c42111

Browse files
committed
Only use ChromeExtensionReloader in Chrome
1 parent 18872cf commit 5c42111

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ 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 ChromeExtensionReloader = require('webpack-chrome-extension-reloader')
87
const ZipPlugin = require('zip-webpack-plugin')
98
const defaultOptions = { components: {} }
109

@@ -97,13 +96,14 @@ module.exports = (api, options) => {
9796
}))
9897
}
9998

100-
if (isDevelopment) {
99+
if (options.api === 'chrome' && isDevelopment) {
101100
const entries = { background: 'background' }
102101

103102
if (pluginOptions.components.contentScript) {
104103
entries.contentScript = 'content-script'
105104
}
106105

106+
const ChromeExtensionReloader = require('webpack-chrome-extension-reloader')
107107
webpackConfig.plugins.push(new ChromeExtensionReloader({ entries }))
108108
}
109109
})

0 commit comments

Comments
 (0)