entry-watch-webpack-plugin

0.1.0 • Public • Published

entry-watch-webpack-plugin

watch entry change for MPA

npm version Build Status Dependencies Status

Install

npm install entry-watch-webpack-plugin --save-dev

Usage

配合 dynamic-entry,

const path = require('path');
const EntryWatchWebpackPlugin = require('entry-watch-webpack-plugin');
 
const entryRoot = path.resolve(__dirname, 'src');
 
module.exports = {
  async entry() {
    // 这里获取多入口配置, 需要自己实现
    const entries = await getEntries(entryRoot);
    return entries;
  },
  mode: 'development',
  output: {
    path: path.resolve(__dirname, 'build'),
  },
  plugins: [
    new EntryWatchWebpackPlugin(entryRoot),
  ],
};

License

MIT

Package Sidebar

Install

npm i entry-watch-webpack-plugin

Weekly Downloads

1

Version

0.1.0

License

MIT

Unpacked Size

6.92 kB

Total Files

13

Last publish

Collaborators

  • samuraime