webpack-serve-output
TypeScript icon, indicating that this package has built-in type declarations

1.0.7 • Public • Published

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.

NPM version GITHUB star MIT-license

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

/webpack-serve-output/

    Package Sidebar

    Install

    npm i webpack-serve-output

    Weekly Downloads

    1

    Version

    1.0.7

    License

    MIT

    Unpacked Size

    6.95 kB

    Total Files

    8

    Last publish

    Collaborators

    • zh-lx