Adding PLUGIN_CHAT_PACKAGE_NAME
This commit is contained in:
parent
6d3f376963
commit
20a5372e12
1
client/@types/global.d.ts
vendored
Normal file
1
client/@types/global.d.ts
vendored
Normal file
@ -0,0 +1 @@
|
||||
declare const PLUGIN_CHAT_PACKAGE_NAME: string
|
@ -1,6 +1,9 @@
|
||||
const path = require("path")
|
||||
const path = require('path')
|
||||
const webpack = require('webpack')
|
||||
|
||||
const EsmWebpackPlugin = require("@purtuga/esm-webpack-plugin")
|
||||
const EsmWebpackPlugin = require('@purtuga/esm-webpack-plugin')
|
||||
|
||||
const packagejson = require('./package.json')
|
||||
|
||||
const clientFiles = [
|
||||
'common-client-plugin',
|
||||
@ -27,7 +30,12 @@ let config = clientFiles.map(f => ({
|
||||
library: "script",
|
||||
libraryTarget: "var"
|
||||
},
|
||||
plugins: [ new EsmWebpackPlugin() ]
|
||||
plugins: [
|
||||
new webpack.DefinePlugin({
|
||||
PLUGIN_CHAT_PACKAGE_NAME: JSON.stringify(packagejson.name)
|
||||
}),
|
||||
new EsmWebpackPlugin()
|
||||
]
|
||||
}))
|
||||
|
||||
config.push({
|
||||
|
Loading…
x
Reference in New Issue
Block a user