UNPKG

@ctsj/build

Version:

一个基于webpack的打包工具

26 lines (23 loc) 573 B
const path = require('path'); const webpack = require('webpack'); const runtimePath = process.argv[5]; module.exports = { entry: { commons: [path.join(runtimePath, 'src', 'commons')], }, output: { path: path.join(runtimePath, 'src', 'assets', 'dll'), filename: '[name].js', library: '[name]_[hash]', }, mode: 'development', plugins: [ new webpack.DllPlugin({ path: path.join(runtimePath, 'src', 'assets', 'dll', '[name]-manifest.json'), name: '[name]_[hash]', }), ], resolve: { extensions: ['.js', '.jsx'], }, };