1.0.7 • Published 4 years ago
t-learn-plugin v1.0.7
t-learn-plugin
This is a collection of plugins for learning about WebPack
Getting Started
To begin, you'll need to install t-learn-plugin
:
npm install t-learn-plugin --save-dev
This plugins These include the following plugins
- CopyWebpackPlugin (implemented)
- FileListPlugin (pending) --There is a very small alarm
- RemConsole (pending) --There is a very small alarm
Then add the plugin to your webpack
config. For example:
webpack.config.js
const { CopyWebpackPlugin } = require("t-learn-plugin");
const { RemCommentsPlugin } = require("t-learn-plugin");
const { FileListPlugin } = require("t-learn-plugin");
module.exports = {
plugins: [
new fileListPlugin({
filename: 'filename.md'
})
new RemCommentsPlugin()
new CopyPlugin({
from: 'public',
to: 'css',
ignore: ['**/index.html']
}),
],
};
ℹ️
t-learn-plugin
is not designed to copy files generated from the build process; rather, it is to copy files that already exist in the source tree, as part of the build process.ℹ️ You can get the original source filename from Asset Objects.
Patterns
Name | Type | Default | Description |
---|---|---|---|
from | {String} | undefined | Glob or path from where we copy files. |
to | {String} | compiler.options.output | Output path. |
ignore | {array} | undefined | A path that determines how to |