Skip to content

Commit 26ac40c

Browse files
committed
docs(guides): update getting-started to use ES6 syntax
Fixes #7636
1 parent 94ed158 commit 26ac40c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/content/guides/getting-started.mdx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,9 +247,12 @@ As of version 4, webpack doesn't require any configuration, but most projects wi
247247
**webpack.config.js**
248248

249249
```javascript
250-
const path = require('path');
250+
import path from 'path';
251+
import { fileURLToPath } from 'url';
251252

252-
module.exports = {
253+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
254+
255+
export default {
253256
entry: './src/index.js',
254257
output: {
255258
filename: 'main.js',

0 commit comments

Comments
 (0)