Typescript for frontend code.
This commit is contained in:
@ -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"
|
||||
},
|
||||
|
Reference in New Issue
Block a user