chrome-extension-webpack-boilerplate icon indicating copy to clipboard operation
chrome-extension-webpack-boilerplate copied to clipboard

Fixed #71 by excluding manifest.json from clean

Open wolph opened this issue 5 years ago • 3 comments

wolph avatar Jan 16 '20 00:01 wolph

@samuelsimoes Can you please take a look at this PR?

ArthurG avatar May 03 '20 04:05 ArthurG

This does not solve the problem of having to copy an entire folder, as when using _locales, while { copyUnmodified: true } does.

For example:

new CopyWebpackPlugin([{
  from: "src/manifest.json",
  transform: function (content, path) {
    // generates the manifest file using the package.json informations
    return Buffer.from(JSON.stringify({
      description: process.env.npm_package_description,
      version: process.env.npm_package_version,
      ...JSON.parse(content.toString())
    }))
  }
},  {
  from: 'src/_locales',
  to: '_locales'
}], {
  copyUnmodified: true
}),

rayronvictor avatar Aug 21 '20 13:08 rayronvictor

This does not solve the problem of having to copy an entire folder, as when using _locales, while { copyUnmodified: true } does.

Perhaps that should be added, but when the manifest.json disappears Chrome tends to remove the extension requiring you to re-add it. It definitely should never be deleted

wolph avatar Aug 21 '20 13:08 wolph