|
|
|
@ -2,15 +2,19 @@ const path = require("path") |
|
|
|
|
|
|
|
|
|
const EsmWebpackPlugin = require("@purtuga/esm-webpack-plugin") |
|
|
|
|
|
|
|
|
|
let config = { |
|
|
|
|
entry: "./client/common-client-plugin.js", |
|
|
|
|
const clientFiles = [ |
|
|
|
|
'common-client-plugin.js' |
|
|
|
|
] |
|
|
|
|
|
|
|
|
|
let config = clientFiles.map(f => ({ |
|
|
|
|
entry: "./client/" + f, |
|
|
|
|
output: { |
|
|
|
|
path: path.resolve(__dirname, "./dist"), |
|
|
|
|
filename: "./common-client-plugin.js", |
|
|
|
|
filename: "./" + f, |
|
|
|
|
library: "script", |
|
|
|
|
libraryTarget: "var" |
|
|
|
|
}, |
|
|
|
|
plugins: [new EsmWebpackPlugin()] |
|
|
|
|
} |
|
|
|
|
plugins: [ new EsmWebpackPlugin() ] |
|
|
|
|
})) |
|
|
|
|
|
|
|
|
|
module.exports = config |
|
|
|
|