My current webpack setup involves copying the package.json
to the dist folder using the CopyWebpackPlugin.
(...)
plugins: [
new CopyPlugin({
patterns: [{
from: "package.json",
to: "dist"
}],
})
],
(...)
Is there a way to copy the package.json
without including the script tag section:
{
"name": "example-project",
"version": (...),
"description": "(...)",
"main": (...),
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"",
"start": "node server.js"
},
"repository": {
"type": "git",
"url": "git+https://github.com/example/example-project.git"
},
"author": "John Doe",
"dependencies": {(...)},
"devDependencies": {(...)}
}
I have considered using gulp to manipulate the JSON and create a cleaner file, but I'm exploring other options.