2019-11-19 16:08:04 +00:00
|
|
|
const path = require("path")
|
|
|
|
|
|
|
|
const EsmWebpackPlugin = require("@purtuga/esm-webpack-plugin")
|
|
|
|
|
2020-08-21 12:47:09 +00:00
|
|
|
const clientFiles = [
|
2021-02-20 14:41:00 +00:00
|
|
|
'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,
|
2019-11-19 16:08:04 +00:00
|
|
|
output: {
|
|
|
|
path: path.resolve(__dirname, "./dist"),
|
2020-08-21 12:47:09 +00:00
|
|
|
filename: "./" + f,
|
2019-11-19 16:08:04 +00:00
|
|
|
library: "script",
|
|
|
|
libraryTarget: "var"
|
|
|
|
},
|
2020-08-21 12:47:09 +00:00
|
|
|
plugins: [ new EsmWebpackPlugin() ]
|
|
|
|
}))
|
2019-11-19 16:08:04 +00:00
|
|
|
|
2021-02-20 19:42:41 +00:00
|
|
|
config.push({
|
2021-02-20 22:12:12 +00:00
|
|
|
entry: "./conversejs/builtin.js",
|
2021-02-20 19:42:41 +00:00
|
|
|
output: {
|
2021-02-20 22:12:12 +00:00
|
|
|
path: path.resolve(__dirname, "./dist/static"),
|
|
|
|
filename: "./builtin.js"
|
2021-02-20 19:42:41 +00:00
|
|
|
}
|
|
|
|
})
|
|
|
|
|
2019-11-19 16:08:04 +00:00
|
|
|
module.exports = config
|