webpack-serve-output
v1.0.7
Published
A webpack plugin that outputs the content compiled by webpack-dev-server to the file system.
Downloads
11
Maintainers
Readme
webpack-serve-output
webpack-serve-output
can outputs content compiled by webpack-dev-server
to the file system, and the files can be hot updated.
Installation
npm install webpack-serve-output
Usage
Add webpack-serve-output
to plugins in the webpack.config.js
file, it will output content compiled by webpack-dev-server
to the file system when the serve is running.
The output directory is output.path
in the config of webpack by default.
// webpack.config.js
const WebpackServeOutput = require('webpack-serve-output');
module.exports = {
// ...other config
plugins: [new WebpackServeOutput()],
};
Specifies the output directory:
// webpack.config.js
const path = require('path');
const WebpackServeOutput = require('webpack-serve-output');
module.exports = {
// ...other config
plugins: [new WebpackServeOutput({
outputPath: path.resolve(__dirname, './output')
})],
};
License
Licensed under MIT
Copyright (c) 2022 zhoulixiang