Skip to content

Commit

Permalink
move to babel
Browse files Browse the repository at this point in the history
  • Loading branch information
alvindimas05 committed Aug 15, 2024
1 parent a826b21 commit 87600ef
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 6 deletions.
10 changes: 10 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"presets": [
"@babel/preset-env",
"@babel/preset-typescript"
],
"plugins": [
"@babel/proposal-class-properties",
"@babel/proposal-object-rest-spread"
]
}
10 changes: 10 additions & 0 deletions babel.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"presets": [
[
"@babel/preset-env",
{
"modules": "amd"
}
]
]
}
Binary file modified bun.lockb
Binary file not shown.
12 changes: 9 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,23 @@
"scripts": {
"clean": "rimraf build",
"dev": "bun run index.ts",
"bundle": "webpack",
"compile": "nexe build/bundle.js -o build/amdhelper --remote https://github.com/alvindimas05/nexe-assets/releases/download/v0.0.1",
"bundle": "bun run clean && webpack",
"compile": "nexe build/bundle.js -o build/amdhelper --remote https://github.com/alvindimas05/nexe/releases/download/v0.0.1",
"build": "bun run clean && bun run bundle && bun run compile"
},
"devDependencies": {
"@babel/plugin-proposal-class-properties": "^7.18.6",
"@babel/plugin-proposal-object-rest-spread": "^7.20.7",
"@babel/preset-env": "^7.25.3",
"@babel/preset-typescript": "^7.24.7",
"@types/bun": "latest",
"@types/node": "^20.14.11",
"@types/yargs": "^17.0.32",
"babel-core": "^6.26.3",
"babel-loader": "^9.1.3",
"babel-preset-env": "^1.7.0",
"nexe": "^4.0.0-rc.6",
"rimraf": "^6.0.1",
"ts-loader": "^9.5.1",
"webpack": "^5.93.0",
"webpack-cli": "^5.1.4"
},
Expand Down
9 changes: 6 additions & 3 deletions webpack.config.js → webpack.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,19 @@ module.exports = {
target: "node",
entry: "./index.ts",
mode: "production",
plugins: [new Dotenv()],
plugins: [
new Dotenv(),
],
output: {
filename: 'bundle.js',
path: path.resolve(__dirname, 'build'),
},
module: {
rules: [
{
test: /\.ts?$/,
loader: 'ts-loader'
test: /\.(js|jsx|tsx|ts)$/,
exclude: /node_modules/,
loader: 'babel-loader'
}
]
},
Expand Down

0 comments on commit 87600ef

Please sign in to comment.