Skip to content

Commit

Permalink
[BETA] Fix path for babel env
Browse files Browse the repository at this point in the history
  • Loading branch information
The-Best-Codes committed Nov 30, 2024
1 parent 976a493 commit f6e115f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
13 changes: 1 addition & 12 deletions editing/scripts/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,8 @@ import commonjs from "@rollup/plugin-commonjs";
import json from "@rollup/plugin-json";
import replace from "@rollup/plugin-replace";
import babel from "@rollup/plugin-babel";
import { fileURLToPath } from "url";
import { exec } from "child_process";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const discraftDir = path.resolve(__dirname, "..");

const projectDir = process.cwd();
const srcDir = path.join(projectDir, "src");
Expand Down Expand Up @@ -122,13 +118,6 @@ async function build(options) {
}
await fs.promises.mkdir(outputDir, { recursive: true });

// Resolve babel preset path
const presetEnvPath = path.join(
discraftDir,
"node_modules",
"@babel/preset-env"
);

// Create rollup config
const rollupConfig = {
input: inputFile,
Expand Down Expand Up @@ -166,7 +155,7 @@ async function build(options) {
babelrc: false,
presets: [
[
presetEnvPath,
"@babel/preset-env",
{
targets: { node: "current" },
modules: false,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "discraft",
"version": "1.5.8-beta.1",
"version": "1.5.8-beta.2",
"description": "Like Next.js, but for Discord bots",
"main": "index.js",
"type": "module",
Expand Down

0 comments on commit f6e115f

Please sign in to comment.