Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
const { NODE_ENV = 'production' } = process.env;
import { dirname } from 'node:path';
import { fileURLToPath } from 'node:url';

const { dirname } = import.meta;
const { NODE_ENV = 'production' } = process.env;
const __dirname = dirname(fileURLToPath(import.meta.url));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the linter did not like the leading underscore here

Suggested change
const __dirname = dirname(fileURLToPath(import.meta.url));
const dirname = dirname(fileURLToPath(import.meta.url));


export default /** @type {import('webpack').Configuration} */ ({
mode: NODE_ENV,
Expand All @@ -17,7 +19,7 @@ export default /** @type {import('webpack').Configuration} */ ({
target: ['web'],
output: {
filename: '[name].js',
path: `${dirname}/_site/assets/js`,
path: `${__dirname}/_site/assets/js`,
},
resolve: {
extensions: ['.js', '.ts', '.tsx'],
Expand Down