@@ -5,7 +5,6 @@ const logger = require('@vue/cli-shared-utils')
55const CopyWebpackPlugin = require ( 'copy-webpack-plugin' )
66const ChromeExtensionReloader = require ( 'webpack-chrome-extension-reloader' )
77const WebpackShellPlugin = require ( 'webpack-shell-plugin-next' )
8- const HtmlWebpackPlugin = require ( 'html-webpack-plugin' )
98const ZipPlugin = require ( 'zip-webpack-plugin' )
109
1110const appRootPath = process . cwd ( )
@@ -16,7 +15,6 @@ module.exports = (api) => {
1615 const isProduction = api . service . mode === 'production'
1716 const outputDir = api . resolve ( api . service . projectOptions . outputDir || 'dist' )
1817 const packageScript = isProduction ? null : 'remove-evals.js'
19- const hasOptionsPageEntry = fs . existsSync ( api . resolve ( './src/options/options.js' ) )
2018 const hasKeyFile = fs . existsSync ( api . resolve ( 'key.pem' ) )
2119
2220 api . configureWebpack ( ( webpackConfig ) => {
@@ -25,11 +23,6 @@ module.exports = (api) => {
2523
2624 delete webpackConfig . entry . app
2725 webpackConfig . entry . background = './src/background.js'
28- webpackConfig . entry [ 'popup/popup' ] = './src/popup/popup.js'
29-
30- if ( hasOptionsPageEntry ) {
31- webpackConfig . entry [ 'options/options' ] = './src/options/options.js'
32- }
3326
3427 if ( isProduction ) {
3528 if ( hasKeyFile ) {
@@ -81,30 +74,6 @@ module.exports = (api) => {
8174 }
8275 ] ) )
8376
84- webpackConfig . plugins . push ( new HtmlWebpackPlugin ( {
85- title : name ,
86- hash : true ,
87- cache : true ,
88- inject : 'body' ,
89- filename : './popup/popup.html' ,
90- template : './src/popup/popup.html' ,
91- appMountId : 'app' ,
92- chunks : [ 'popup/popup' , 'chunk-vendors' ]
93- } ) )
94-
95- if ( hasOptionsPageEntry ) {
96- webpackConfig . plugins . push ( new HtmlWebpackPlugin ( {
97- title : name ,
98- hash : true ,
99- cache : true ,
100- inject : 'body' ,
101- filename : './options/options.html' ,
102- template : './src/options/options.html' ,
103- appMountId : 'app' ,
104- chunks : [ 'options/options' , 'chunk-vendors' ]
105- } ) )
106- }
107-
10877 if ( packageScript === null ) {
10978 webpackConfig . plugins . push ( new ZipPlugin ( {
11079 path : api . resolve ( `${ api . service . projectOptions . outputDir || 'dist' } -zip` ) ,
0 commit comments