diff --git a/webpack.chrome.config.js b/webpack.chrome.config.js index 512fc76..ad719e8 100644 --- a/webpack.chrome.config.js +++ b/webpack.chrome.config.js @@ -3,39 +3,37 @@ const { compact } = require("lodash/fp") const baseConfig = require("./webpack.base.config") -module.exports = env => { +module.exports = (env) => { const config = baseConfig(env) config.plugins.unshift( - new CopyWebpackPlugin([ - { - from: "src/manifest.json", - transform: function(content, _path) { - const manifest = JSON.parse( - content - .toString() - .replace(/\[version\]/g, process.env.npm_package_version) - ) - return Buffer.from( - JSON.stringify({ - ...manifest, - permissions: compact([ - ...manifest.permissions, - env.NODE_ENV === "development" - ? "http://*.mocoapp.localhost/*" - : null - ]), - options_ui: { - ...manifest.options_ui, - chrome_style: true - }, - description: process.env.npm_package_description, - version: process.env.npm_package_version - }) - ) - } - } - ]) + new CopyWebpackPlugin({ + patterns: [ + { + from: "src/manifest.json", + transform: function (content, _path) { + const manifest = JSON.parse( + content.toString().replace(/\[version\]/g, process.env.npm_package_version), + ) + return Buffer.from( + JSON.stringify({ + ...manifest, + permissions: compact([ + ...manifest.permissions, + env.NODE_ENV === "development" ? "http://*.mocoapp.localhost/*" : null, + ]), + options_ui: { + ...manifest.options_ui, + chrome_style: true, + }, + description: process.env.npm_package_description, + version: process.env.npm_package_version, + }), + ) + }, + }, + ], + }), ) return config diff --git a/webpack.firefox.config.js b/webpack.firefox.config.js index abc7b33..6852661 100644 --- a/webpack.firefox.config.js +++ b/webpack.firefox.config.js @@ -9,7 +9,7 @@ module.exports = (env) => { config.plugins.unshift( new CopyWebpackPlugin({ - pattern: [ + patterns: [ { from: "src/manifest.json", transform: function (content, _path) {