Skip to content

Commit

Permalink
Merge pull request #21 from RoguedBear/patch-1
Browse files Browse the repository at this point in the history
add missing `path` import in bundling guide
  • Loading branch information
zerebos authored Nov 2, 2024
2 parents c541789 + 1438d62 commit ad8ebdb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion docs/plugins/intermediate/bundling.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@ Before we even configure Webpack proper, let's just quickly adjust our `package.
Now with that out of the way, let's take a look at a general commonjs output Webpack configuration.

```js title="webpack.config.js" showLineNumbers
const path = require("path");

module.exports = {
mode: "development",
target: "node",
Expand Down Expand Up @@ -177,6 +179,7 @@ module.exports = {
So if we put it all together we end up with a full config like this:

```js title="webpack.config.js" showLineNumbers
const path = require("path");
const webpack = require("webpack");
const pkg = require("./package.json");
const pluginConfig = require("./src/config.json");
Expand Down Expand Up @@ -403,4 +406,4 @@ Now try building and opening your settings panel again, you'll see it loads just

### TypeScript

This has no special requirements for BetterDiscord! Take a look at [Webpack's official guide](https://webpack.js.org/guides/typescript/) on using TypeScript with Webpack.
This has no special requirements for BetterDiscord! Take a look at [Webpack's official guide](https://webpack.js.org/guides/typescript/) on using TypeScript with Webpack.

0 comments on commit ad8ebdb

Please sign in to comment.