File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ module.exports = (api) => {
1616 const outputDir = api . resolve ( api . service . projectOptions . outputDir || 'dist' )
1717 const packageScript = isProduction ? 'build-zip.js' : 'remove-evals.js'
1818 const hasOptionsPageEntry = fs . existsSync ( api . resolve ( './src/options/options.js' ) )
19+ const hasKeyFile = fs . existsSync ( api . resolve ( 'key.pem' ) )
1920
2021 api . configureWebpack ( ( webpackConfig ) => {
2122 webpackConfig . output . filename = '[name].js'
@@ -30,7 +31,11 @@ module.exports = (api) => {
3031 }
3132
3233 if ( isProduction ) {
33- webpackConfig . plugins . push ( new CopyWebpackPlugin ( [ { from : './key.pem' , to : 'key.pem' } ] ) )
34+ if ( hasKeyFile ) {
35+ webpackConfig . plugins . push ( new CopyWebpackPlugin ( [ { from : './key.pem' , to : 'key.pem' } ] ) )
36+ } else {
37+ logger . warn ( 'No `key.pem` file detected. This is problematic only if you are publishing an existing extension' )
38+ }
3439 }
3540
3641 webpackConfig . plugins . push ( new CopyWebpackPlugin ( [
You can’t perform that action at this time.
0 commit comments