2020-07-10 09:24:06 +00:00
|
|
|
const CracoAlias = require("craco-alias");
|
2023-03-03 06:47:35 +00:00
|
|
|
const CracoBabelLoader = require("craco-babel-loader");
|
|
|
|
|
const path = require("path");
|
2020-06-02 07:54:31 +00:00
|
|
|
|
2019-10-29 12:02:58 +00:00
|
|
|
module.exports = {
|
2022-06-21 13:57:34 +00:00
|
|
|
devServer: {
|
|
|
|
|
client: {
|
|
|
|
|
webSocketURL: {
|
2022-07-07 08:30:57 +00:00
|
|
|
hostname: "127.0.0.1",
|
|
|
|
|
pathname: "/ws",
|
|
|
|
|
port: 3000,
|
|
|
|
|
protocol: "ws",
|
2022-06-21 13:57:34 +00:00
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
webpack: {
|
|
|
|
|
configure: {
|
|
|
|
|
resolve: {
|
|
|
|
|
fallback: {
|
|
|
|
|
assert: false,
|
|
|
|
|
stream: false,
|
|
|
|
|
util: false,
|
|
|
|
|
fs: false,
|
|
|
|
|
os: false,
|
|
|
|
|
path: false,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
module: {
|
|
|
|
|
rules: [
|
|
|
|
|
{
|
|
|
|
|
test: /\.m?js/,
|
|
|
|
|
resolve: { fullySpecified: false },
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
ignoreWarnings: [
|
|
|
|
|
function ignoreSourcemapsloaderWarnings(warning) {
|
|
|
|
|
return (
|
|
|
|
|
warning.module &&
|
|
|
|
|
warning.module.resource.includes("node_modules") &&
|
|
|
|
|
warning.details &&
|
|
|
|
|
warning.details.includes("source-map-loader")
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
],
|
2021-11-23 08:01:46 +00:00
|
|
|
},
|
|
|
|
|
},
|
2020-06-02 07:54:31 +00:00
|
|
|
plugins: [
|
2020-07-10 09:24:06 +00:00
|
|
|
{
|
|
|
|
|
plugin: CracoAlias,
|
|
|
|
|
options: {
|
|
|
|
|
source: "tsconfig",
|
|
|
|
|
// baseUrl SHOULD be specified
|
|
|
|
|
// plugin does not take it from tsconfig
|
|
|
|
|
baseUrl: "./src",
|
|
|
|
|
// tsConfigPath should point to the file where "baseUrl" and "paths" are specified
|
|
|
|
|
tsConfigPath: "./tsconfig.path.json",
|
|
|
|
|
},
|
|
|
|
|
},
|
2023-03-03 06:47:35 +00:00
|
|
|
{
|
|
|
|
|
plugin: CracoBabelLoader,
|
|
|
|
|
options: {
|
|
|
|
|
includes: [path.resolve("packages")],
|
|
|
|
|
},
|
|
|
|
|
},
|
2020-06-02 07:54:31 +00:00
|
|
|
{
|
|
|
|
|
plugin: "prismjs",
|
|
|
|
|
options: {
|
|
|
|
|
languages: ["javascript"],
|
|
|
|
|
plugins: [],
|
|
|
|
|
theme: "twilight",
|
|
|
|
|
css: false,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
],
|
2022-04-18 08:21:36 +00:00
|
|
|
};
|