@akanjs/config 0.0.25 → 0.0.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +7 -10
- package/src/next.base.js +12 -2
- package/src/next.base.ts +12 -2
- package/src/postcss.config.base.js +25 -0
- package/src/styles.css +599 -0
- package/src/webpack.backend.d.ts +5 -0
- package/src/webpack.backend.js +83 -0
- package/src/webpack.backend.ts +74 -0
- package/src/webpack.csr.d.ts +5 -0
- package/src/webpack.csr.js +81 -0
- package/src/webpack.csr.ts +76 -0
- package/src/jest.preset.js +0 -3
- package/src/tailwind.base.js +0 -351
- package/src/webpack.backend.base.js +0 -43
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
const { composePlugins, withNx } = require("@nx/webpack");
|
|
2
|
-
const webpack = require("webpack");
|
|
3
|
-
const path = require("path");
|
|
4
|
-
const nodeExternals = require("webpack-node-externals");
|
|
5
|
-
const { RunScriptWebpackPlugin } = require("run-script-webpack-plugin");
|
|
6
|
-
const appName = process.env.NX_TASK_TARGET_PROJECT ?? "unknown";
|
|
7
|
-
const GeneratePackageJsonPlugin = require("generate-package-json-webpack-plugin");
|
|
8
|
-
|
|
9
|
-
module.exports = composePlugins(withNx(), (config) => {
|
|
10
|
-
const tsloaderRule = config.module.rules.find((rule) => rule.loader?.includes("ts-loader"));
|
|
11
|
-
if (tsloaderRule)
|
|
12
|
-
tsloaderRule.exclude = [
|
|
13
|
-
/\.tsx$/, // Explicitly exclude .tsx files
|
|
14
|
-
/\/ui\/.*\.(ts|tsx)$/, // Exclude .ts and .tsx files in any "ui" directory
|
|
15
|
-
/\/client\/.*\.(ts|tsx)$/, // Exclude .ts and .tsx files in any "client" directory
|
|
16
|
-
/\/next\/.*\.(ts|tsx)$/, // Exclude .ts and .tsx files in any "client" directory
|
|
17
|
-
/\.store\.ts$/, // Exclude files ending with .store.ts
|
|
18
|
-
];
|
|
19
|
-
const basePackage = {
|
|
20
|
-
name: `${appName}/backend`,
|
|
21
|
-
version: "1.0.0",
|
|
22
|
-
main: "./main.js",
|
|
23
|
-
engines: { node: ">= 18" },
|
|
24
|
-
};
|
|
25
|
-
config.plugins.push(new GeneratePackageJsonPlugin(basePackage));
|
|
26
|
-
|
|
27
|
-
if (process.env.NX_TASK_TARGET_TARGET !== "serve-backend") return config;
|
|
28
|
-
const cwd = process.cwd();
|
|
29
|
-
Object.assign(config, {
|
|
30
|
-
entry: [path.join(cwd, "node_modules/webpack/hot/poll?100"), `./main.ts`],
|
|
31
|
-
mode: "development",
|
|
32
|
-
output: {
|
|
33
|
-
path: path.join(cwd, `dist/apps/${appName}/backend`),
|
|
34
|
-
filename: "main.js",
|
|
35
|
-
},
|
|
36
|
-
});
|
|
37
|
-
config.plugins.push(
|
|
38
|
-
new webpack.HotModuleReplacementPlugin(),
|
|
39
|
-
new RunScriptWebpackPlugin({ name: "main.js", autoRestart: true })
|
|
40
|
-
);
|
|
41
|
-
config.externals.push(nodeExternals({ allowlist: ["webpack/hot/poll?100"] }));
|
|
42
|
-
return config;
|
|
43
|
-
});
|