1.1.1 • Published 5 years ago

dev-serve-update-webpack-plugin v1.1.1

Weekly downloads
-
License
ISC
Repository
-
Last release
5 years ago

dev-serve-update-webpack-plugin

配合项目super-project-staff子产线使用的,在开发环境中,将构建打包生成的js文件的路径输出到指定的文件中

options

OptionDescTypeExample
appName子产线的应用名称,用于生成的json中作为key的取值String"Hello"
devServerPort开发端口(用于生成绝对路径)Number7766
superServeConfigPath输出的文件的路径(一般指super-project-staff的serve.dev.config.json文件路径)String(path)path.resolve(__dirname, '../super_project_staff/serve.dev.config.json')

Options example:

plugins: [
  new ServiceConfigUpdateWebpackPlugin({ 
    // 项目名
    appName: APP_NAME, 
    // 开发服务器端口号
    devServerPort: DEV_SERVER_PORT,
    // 生成的json文件路径
    output: path.resolve(__dirname, '../super_project_staff/serve.dev.config.json')
  })
]

Output json file example:

{
  "hello": {
    "src": [
      "http://localhost:7766/0.js",
      "http://localhost:7766/1.js",
      "http://localhost:7766/app.js"
    ],
    "timestamp": 1568084495943
  },
  "world": {
    "src": [
      "http://localhost:7744/0.js",
      "http://localhost:7744/1.js",
      "http://localhost:7744/app.js"
    ],
    "timestamp": 1567740866890
  }
}
1.1.1

5 years ago

1.1.0

5 years ago

1.0.0

5 years ago