mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 03:16:11 +01:00
chore(test/client): solve dependency error due to CJS
This commit is contained in:
80
apps/client/webpack.config.cjs
Normal file
80
apps/client/webpack.config.cjs
Normal file
@@ -0,0 +1,80 @@
|
||||
|
||||
const { NxAppWebpackPlugin } = require('@nx/webpack/app-plugin');
|
||||
const { join } = require('path');
|
||||
|
||||
module.exports = {
|
||||
output: {
|
||||
path: join(__dirname, 'dist'),
|
||||
},
|
||||
devServer: {
|
||||
port: 4200,
|
||||
client: {
|
||||
overlay: {
|
||||
errors: true,
|
||||
warnings: false,
|
||||
runtimeErrors: true
|
||||
}
|
||||
}
|
||||
},
|
||||
plugins: [
|
||||
new NxAppWebpackPlugin({
|
||||
tsConfig: './tsconfig.app.json',
|
||||
compiler: 'swc',
|
||||
main: "./src/index.ts",
|
||||
additionalEntryPoints: [
|
||||
{
|
||||
entryName: "desktop",
|
||||
entryPath: "./src/desktop.ts"
|
||||
},
|
||||
{
|
||||
entryName: "mobile",
|
||||
entryPath: "./src/mobile.ts"
|
||||
},
|
||||
{
|
||||
entryName: "login",
|
||||
entryPath: "./src/login.ts"
|
||||
},
|
||||
{
|
||||
entryName: "setup",
|
||||
entryPath: "./src/setup.ts"
|
||||
},
|
||||
{
|
||||
entryName: "share",
|
||||
entryPath: "./src/share.ts"
|
||||
},
|
||||
{
|
||||
// TriliumNextTODO: integrate set_password into setup entry point/view
|
||||
entryName: "set_password",
|
||||
entryPath: "./src/set_password.ts"
|
||||
}
|
||||
],
|
||||
externalDependencies: [
|
||||
"electron"
|
||||
],
|
||||
baseHref: '/',
|
||||
assets: [
|
||||
"./src/assets",
|
||||
"./src/stylesheets",
|
||||
"./src/libraries",
|
||||
"./src/fonts",
|
||||
"./src/translations"
|
||||
],
|
||||
styles: [],
|
||||
stylePreprocessorOptions: {
|
||||
sassOptions: {
|
||||
quietDeps: true
|
||||
}
|
||||
},
|
||||
outputHashing: false,
|
||||
optimization: process.env['NODE_ENV'] === 'production',
|
||||
})
|
||||
],
|
||||
resolve: {
|
||||
fallback: {
|
||||
path: false,
|
||||
fs: false,
|
||||
util: false
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user