Add webpack
This commit is contained in:
30
scripts/webpack.config.prod.js
Normal file
30
scripts/webpack.config.prod.js
Normal file
@@ -0,0 +1,30 @@
|
||||
const path = require('path');
|
||||
const common = require('./webpack.config.common');
|
||||
|
||||
const genConfig = ({
|
||||
entry, filename, library, libraryTarget,
|
||||
}) => ({
|
||||
...common,
|
||||
mode: 'production',
|
||||
devtool: 'source-map',
|
||||
entry,
|
||||
output: {
|
||||
path: path.resolve(__dirname, '..', 'dist'),
|
||||
filename,
|
||||
library,
|
||||
libraryTarget,
|
||||
},
|
||||
});
|
||||
|
||||
module.exports = [
|
||||
genConfig({
|
||||
entry: path.resolve(__dirname, '..', 'src', 'index.js'),
|
||||
filename: 'ffmpeg.min.js',
|
||||
library: 'FFmpeg',
|
||||
libraryTarget: 'umd',
|
||||
}),
|
||||
//genConfig({
|
||||
// entry: path.resolve(__dirname, '..', 'src', 'worker-script', 'browser', 'index.js'),
|
||||
// filename: 'worker.min.js',
|
||||
//}),
|
||||
];
|
||||
Reference in New Issue
Block a user