Typescript for frontend code.

This commit is contained in:
John Livingston
2021-04-07 18:14:58 +02:00
parent 89a03032ff
commit 3e46552ec0
8 changed files with 302 additions and 78 deletions

View File

@ -3,15 +3,23 @@ const path = require("path")
const EsmWebpackPlugin = require("@purtuga/esm-webpack-plugin")
const clientFiles = [
'common-client-plugin.js',
'videowatch-client-plugin.js'
'common-client-plugin',
'videowatch-client-plugin'
]
let config = clientFiles.map(f => ({
entry: "./client/" + f,
entry: "./client/" + f + ".ts",
module: {
rules: [
{
test: /\.tsx?$/,
use: 'ts-loader'
}
]
},
output: {
path: path.resolve(__dirname, "./dist/client"),
filename: "./" + f,
filename: "./" + f + ".js",
library: "script",
libraryTarget: "var"
},