mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 18:12:29 +08:00
chore(monorepo): get webpack to run something
This commit is contained in:
parent
6b62bdef3c
commit
30214490f4
@ -204,7 +204,6 @@
|
|||||||
"@types/xml2js": "0.4.14",
|
"@types/xml2js": "0.4.14",
|
||||||
"@types/yargs": "17.0.33",
|
"@types/yargs": "17.0.33",
|
||||||
"@vitest/coverage-v8": "3.1.1",
|
"@vitest/coverage-v8": "3.1.1",
|
||||||
"autoprefixer": "10.4.21",
|
|
||||||
"bootstrap": "5.3.5",
|
"bootstrap": "5.3.5",
|
||||||
"cross-env": "7.0.3",
|
"cross-env": "7.0.3",
|
||||||
"css-loader": "7.1.2",
|
"css-loader": "7.1.2",
|
||||||
@ -224,7 +223,6 @@
|
|||||||
"mark.js": "8.11.1",
|
"mark.js": "8.11.1",
|
||||||
"mermaid": "11.6.0",
|
"mermaid": "11.6.0",
|
||||||
"mind-elixir": "4.5.1",
|
"mind-elixir": "4.5.1",
|
||||||
"mini-css-extract-plugin": "2.9.2",
|
|
||||||
"nodemon": "3.1.9",
|
"nodemon": "3.1.9",
|
||||||
"panzoom": "9.4.3",
|
"panzoom": "9.4.3",
|
||||||
"postcss-loader": "8.1.1",
|
"postcss-loader": "8.1.1",
|
||||||
@ -239,9 +237,7 @@
|
|||||||
"supertest": "7.1.0",
|
"supertest": "7.1.0",
|
||||||
"svg-pan-zoom": "3.6.2",
|
"svg-pan-zoom": "3.6.2",
|
||||||
"swagger-jsdoc": "6.2.8",
|
"swagger-jsdoc": "6.2.8",
|
||||||
"ts-loader": "9.5.2",
|
|
||||||
"tslib": "2.8.1",
|
"tslib": "2.8.1",
|
||||||
"tsx": "4.19.3",
|
|
||||||
"typedoc": "0.28.2",
|
"typedoc": "0.28.2",
|
||||||
"typedoc-plugin-missing-exports": "4.0.0",
|
"typedoc-plugin-missing-exports": "4.0.0",
|
||||||
"typescript": "5.8.3",
|
"typescript": "5.8.3",
|
||||||
|
4
apps/client/.gitignore
vendored
4
apps/client/.gitignore
vendored
@ -1 +1,3 @@
|
|||||||
node_modules
|
node_modules
|
||||||
|
build
|
||||||
|
!build/.gitkeep
|
880
apps/client/package-lock.json
generated
880
apps/client/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -24,9 +24,13 @@
|
|||||||
"build:webpack-stats": "tsx node_modules/webpack/bin/webpack.js -c webpack.config.ts --profile --json=webpack-stats.json"
|
"build:webpack-stats": "tsx node_modules/webpack/bin/webpack.js -c webpack.config.ts --profile --json=webpack-stats.json"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"autoprefixer": "10.4.21",
|
||||||
|
"copy-webpack-plugin": "13.0.0",
|
||||||
|
"mini-css-extract-plugin": "2.9.2",
|
||||||
|
"tsx": "4.19.3",
|
||||||
"webpack": "5.99.5",
|
"webpack": "5.99.5",
|
||||||
"webpack-cli": "6.0.1",
|
"webpack-cli": "6.0.1",
|
||||||
"webpack-dev-middleware": "7.4.2",
|
"webpack-dev-middleware": "7.4.2",
|
||||||
"copy-webpack-plugin": "13.0.0"
|
"ts-loader": "9.5.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
3
apps/client/src/asset_path.ts
Normal file
3
apps/client/src/asset_path.ts
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
import packageJson from "../package.json" with { type: "json" };
|
||||||
|
|
||||||
|
export default `assets/v${packageJson.version}`;
|
9
apps/client/tsconfig.json
Normal file
9
apps/client/tsconfig.json
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"module": "ESNext",
|
||||||
|
"moduleResolution": "bundler",
|
||||||
|
"resolveJsonModule": true,
|
||||||
|
"allowSyntheticDefaultImports": true
|
||||||
|
},
|
||||||
|
"include": [ "./src/**/*.ts" ]
|
||||||
|
}
|
@ -1,7 +1,7 @@
|
|||||||
import { fileURLToPath } from "url";
|
import { fileURLToPath } from "url";
|
||||||
import path from "path";
|
import path from "path";
|
||||||
import autoprefixer from "autoprefixer";
|
import autoprefixer from "autoprefixer";
|
||||||
import assetPath from "./src/services/asset_path.js";
|
import assetPath from "./src/asset_path.js";
|
||||||
import miniCssExtractPlugin from "mini-css-extract-plugin";
|
import miniCssExtractPlugin from "mini-css-extract-plugin";
|
||||||
import type { Configuration } from "webpack";
|
import type { Configuration } from "webpack";
|
||||||
import CopyPlugin from "copy-webpack-plugin";
|
import CopyPlugin from "copy-webpack-plugin";
|
||||||
@ -10,17 +10,17 @@ const rootDir = path.dirname(fileURLToPath(import.meta.url));
|
|||||||
const config: Configuration = {
|
const config: Configuration = {
|
||||||
mode: "production",
|
mode: "production",
|
||||||
entry: {
|
entry: {
|
||||||
setup: "./src/public/app/setup.js",
|
setup: "./src/setup.js",
|
||||||
login: "./src/public/app/login.js",
|
login: "./src/login.js",
|
||||||
mobile: "./src/public/app/mobile.js",
|
mobile: "./src/mobile.js",
|
||||||
desktop: "./src/public/app/desktop.js",
|
desktop: "./src/desktop.js",
|
||||||
share: "./src/public/app/share.js",
|
share: "./src/share.js",
|
||||||
// TriliumNextTODO: integrate set_password into setup entry point/view
|
// TriliumNextTODO: integrate set_password into setup entry point/view
|
||||||
set_password: "./src/public/app/set_password.js"
|
set_password: "./src/set_password.js"
|
||||||
},
|
},
|
||||||
output: {
|
output: {
|
||||||
publicPath: `${assetPath}/app-dist/`,
|
publicPath: `${assetPath}/app-dist/`,
|
||||||
path: path.resolve(rootDir, "build/src/public/app-dist"),
|
path: path.resolve(rootDir, "build"),
|
||||||
filename: "[name].js"
|
filename: "[name].js"
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
@ -46,7 +46,7 @@ const config: Configuration = {
|
|||||||
{
|
{
|
||||||
loader: "ts-loader",
|
loader: "ts-loader",
|
||||||
options: {
|
options: {
|
||||||
configFile: path.join(rootDir, "tsconfig.webpack.json")
|
configFile: path.join(rootDir, "tsconfig.json")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
Loading…
x
Reference in New Issue
Block a user