chrome-extension-webpack-boilerplate
chrome-extension-webpack-boilerplate copied to clipboard
Fixed #71 by excluding manifest.json from clean
@samuelsimoes Can you please take a look at this PR?
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
}),
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