mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 19:05:59 +01:00
build: Fix running webpack on ESM
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
import { fileURLToPath } from "url";
|
||||
import path from "path";
|
||||
import assetPath from "./src/services/asset_path.js";
|
||||
|
||||
module.exports = {
|
||||
const rootDir = path.dirname(fileURLToPath(import.meta.url));
|
||||
export default {
|
||||
mode: 'production',
|
||||
entry: {
|
||||
setup: './src/public/app/setup.js',
|
||||
@@ -10,7 +12,7 @@ module.exports = {
|
||||
},
|
||||
output: {
|
||||
publicPath: `${assetPath}/app-dist/`,
|
||||
path: path.resolve(__dirname, 'src/public/app-dist'),
|
||||
path: path.resolve(rootDir, 'src/public/app-dist'),
|
||||
filename: '[name].js',
|
||||
},
|
||||
devtool: 'source-map',
|
||||
|
||||
Reference in New Issue
Block a user