diff --git a/src/content/guides/getting-started.mdx b/src/content/guides/getting-started.mdx index c09b48c96809..30e55de3d680 100644 --- a/src/content/guides/getting-started.mdx +++ b/src/content/guides/getting-started.mdx @@ -251,6 +251,10 @@ As of version 4, webpack doesn't require any configuration, but most projects wi ```javascript import path from 'path'; +import { fileURLToPath } from 'url'; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); export default { entry: './src/index.js', @@ -259,6 +263,7 @@ export default { path: path.resolve(__dirname, 'dist'), }, }; + ``` Now, let's run the build again but instead using our new configuration file: