peertube-plugin-livechat/webpack.config.js

30 lines
596 B
JavaScript
Raw Normal View History

const path = require("path")
const EsmWebpackPlugin = require("@purtuga/esm-webpack-plugin")
2020-08-21 12:47:09 +00:00
const clientFiles = [
'common-client-plugin.js',
2021-02-18 17:31:12 +00:00
'videowatch-client-plugin.js'
2020-08-21 12:47:09 +00:00
]
let config = clientFiles.map(f => ({
entry: "./client/" + f,
output: {
path: path.resolve(__dirname, "./dist"),
2020-08-21 12:47:09 +00:00
filename: "./" + f,
library: "script",
libraryTarget: "var"
},
2020-08-21 12:47:09 +00:00
plugins: [ new EsmWebpackPlugin() ]
}))
config.push({
entry: "./conversejs/builtin.js",
output: {
path: path.resolve(__dirname, "./dist/static"),
filename: "./builtin.js"
}
})
module.exports = config