mirror of
https://github.com/wassname/talk.git
synced 2026-06-27 18:07:26 +08:00
6d7056d831
* Move talk-server/config to talk-common/config * Refactor build into /src/core/build and use common config * Add embed webpack config * Start implementing embed * Implement embed * Add pym types * Add event emitter to Talk Context * Add MatchMedia test for passing values from the context * Add support for click far away * Integrate pym click events to registerClickFarAway * Add tests * Resolve merge issues * Apply PR review
49 lines
1.3 KiB
JavaScript
49 lines
1.3 KiB
JavaScript
// Apply all the configuration provided in the .env file.
|
|
require("dotenv").config();
|
|
|
|
const path = require("path");
|
|
const fs = require("fs");
|
|
const TsconfigPathsPlugin = require("tsconfig-paths-webpack-plugin");
|
|
const extensions = [".ts", ".tsx", ".js"];
|
|
const paths = require("./config/paths");
|
|
|
|
export default {
|
|
title: "Talk 5.0",
|
|
source: "./src",
|
|
typescript: true,
|
|
host: process.env.HOST || "0.0.0.0",
|
|
port: parseInt(process.env.DOCZ_PORT, 10) || 3030,
|
|
modifyBundlerConfig: config => {
|
|
config.module.rules.push({
|
|
test: /\.css$/,
|
|
use: [
|
|
require.resolve("style-loader"),
|
|
{
|
|
loader: require.resolve("css-loader"),
|
|
options: {
|
|
modules: true,
|
|
importLoaders: 1,
|
|
localIdentName:
|
|
process.env.NODE_ENV === "production"
|
|
? "[hash:base64]"
|
|
: "[name]-[local]-[hash:base64:5]",
|
|
},
|
|
},
|
|
{
|
|
loader: require.resolve("postcss-loader"),
|
|
options: {
|
|
config: {
|
|
path: paths.appPostCssConfig,
|
|
},
|
|
},
|
|
},
|
|
],
|
|
});
|
|
config.resolve.plugins = [
|
|
new TsconfigPathsPlugin({ extensions, configFile: paths.appTsconfig }),
|
|
];
|
|
// fs.writeFileSync(path.resolve(__dirname, "tmp"), stringify(config, null, 2));
|
|
return config;
|
|
},
|
|
};
|