Skip to content

Commit caf68e9

Browse files
author
koalasat
committed
Webpack fix
1 parent e42284f commit caf68e9

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

frontend/webpack.config.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import fs from 'fs-extra';
99
// Declare __dirname for TypeScript
1010
declare const __dirname: string;
1111

12-
const sourceBuild = 'static/frontend';
1312
const outputPaths: string[] = [
1413
path.resolve(__dirname, '../nodeapp/static'),
1514
path.resolve(__dirname, '../desktopApp/static'),
@@ -46,11 +45,11 @@ const configNode = (env: any, argv: { mode: string }): Configuration => {
4645
return {
4746
...config,
4847
output: {
49-
path: path.resolve(__dirname, sourceBuild),
48+
path: path.resolve(__dirname, 'static/frontend'),
5049
filename:
5150
argv.mode === 'production' ? `main.v${version}.[contenthash].js` : `main.v${version}.js`,
5251
clean: true,
53-
publicPath: '/' + sourceBuild,
52+
publicPath: '/static/frontend/',
5453
},
5554
plugins: [
5655
// Django
@@ -142,7 +141,7 @@ const configNode = (env: any, argv: { mode: string }): Configuration => {
142141
compiler.hooks.afterEmit.tapAsync('CopyFilesPlugin', (_compilation, callback) => {
143142
Promise.all(
144143
outputPaths.map((outputPath) => {
145-
const sourceDir = path.resolve(__dirname, sourceBuild);
144+
const sourceDir = path.resolve(__dirname, 'static');
146145
return fs
147146
.copy(sourceDir, outputPath)
148147
.then(() => {

0 commit comments

Comments
 (0)