2020-04-11 08:56:17 +00:00
|
|
|
const path = require('path');
|
|
|
|
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
|
|
|
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
mode: 'production',
|
|
|
|
entry: './src/index.js',
|
|
|
|
output: {
|
|
|
|
filename: 'webfuse-example.js',
|
|
|
|
library: 'webfuse',
|
|
|
|
libraryTarget: 'umd',
|
|
|
|
path: path.resolve(__dirname, './dist')
|
|
|
|
},
|
|
|
|
plugins: [
|
|
|
|
new HtmlWebpackPlugin({
|
|
|
|
title: "Webfuse Example",
|
|
|
|
filename: "index.html",
|
|
|
|
template: "./src/index.html"
|
|
|
|
}),
|
|
|
|
new CopyWebpackPlugin([
|
2020-04-11 17:15:40 +00:00
|
|
|
{ from: './src/style', to: 'style' },
|
|
|
|
{ from: './src/cgi-bin', to: 'cgi-bin', copyPermissions: true }
|
2020-04-11 08:56:17 +00:00
|
|
|
])
|
|
|
|
],
|
|
|
|
resolve: {
|
|
|
|
alias: {
|
|
|
|
webfuse: "webfuse/src/index.js"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|