Skip to content

Commit

Permalink
Fix webpack configs
Browse files Browse the repository at this point in the history
  • Loading branch information
shefalijoshi committed Jan 11, 2024
1 parent 6cc816c commit e65d087
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .webpack/webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
*****************************************************************************/

import path from 'node:path';
const projectRootDir = path.resolve(__dirname, '..');
import { fileURLToPath } from 'node:url';

const projectRootDir = fileURLToPath(new URL('../', import.meta.url));

// eslint-disable no-undef
const WEBPACK_COMMON_CONFIG = {
Expand Down
3 changes: 2 additions & 1 deletion .webpack/webpack.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@
import path from 'path';
import { merge } from 'webpack-merge';
import common from './webpack.common.js';
const projectRootDir = path.resolve(__dirname, '..');
import { fileURLToPath } from 'node:url';

const projectRootDir = fileURLToPath(new URL('../', import.meta.url));
// eslint-disable-next-line no-undef
export default merge(common, {
context: projectRootDir,
Expand Down
4 changes: 3 additions & 1 deletion .webpack/webpack.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@
import path from 'path';
import { merge } from 'webpack-merge';
import common from './webpack.common.js';
import { fileURLToPath } from 'node:url';

const projectRootDir = fileURLToPath(new URL('../', import.meta.url));

const projectRootDir = path.resolve(__dirname, '..');
// eslint-disable-next-line no-undef
export default merge(common, {
context: projectRootDir,
Expand Down

0 comments on commit e65d087

Please sign in to comment.