Skip to content

Commit

Permalink
docs(readme): add example to skip minimizing source files (#588)
Browse files Browse the repository at this point in the history
  • Loading branch information
ddx32 committed Mar 3, 2021
1 parent f2c1bc8 commit a9b06a6
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions README.md
Expand Up @@ -1043,6 +1043,29 @@ Result:
"newdirectory/nested/nestedfile.txt",
```

#### Skip running JavaScript files through a minimizer

Useful if you need to simply copy `*.js` files to destination "as is" without evaluating and minimizing them using Terser.

**webpack.config.js**

```js
module.exports = {
plugins: [
new CopyPlugin({
patterns: [
"relative/path/to/file.ext",
{
from: "**/*",
// Terser skip this file for minimization
info: { minimized: true },
},
],
}),
],
};
```

## Contributing

Please take a moment to read our contributing guidelines if you haven't yet done so.
Expand Down

0 comments on commit a9b06a6

Please sign in to comment.