Skip to content

Commit

Permalink
Merge pull request #55 from UMC-FITple/feat/#54_backend_cicd-13
Browse files Browse the repository at this point in the history
CI/CD 파이프라인 수정-13
  • Loading branch information
seoyeoneel02 authored Aug 16, 2024
2 parents 968f159 + 8d93059 commit 8db5f92
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 35 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start:dev": "nodemon --exec babel-node index.js",
"start:dist": "webpack --mode production & node ./dist/main.js",
"start": "node ./dist/main.js",
"start:dist": "webpack --mode production & node ./dist/main.cjs",
"start": "node ./dist/main.cjs",
"dev": "nodemon index.js",
"build": "webpack",
"lint": "eslint .",
Expand Down
33 changes: 0 additions & 33 deletions webpack.config.cjs

This file was deleted.

38 changes: 38 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import nodeExternals from 'webpack-node-externals';
import path from 'path';
import { fileURLToPath } from 'url';
import { dirname } from 'path';

const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);

export default {
mode: "development",
context: `${__dirname}/src`,
entry: {
app: '../index.js',
},
output: {
path: path.resolve(__dirname, "dist"),
filename: "main.cjs",
},
module: {
rules: [
{
test: /\.js$/,
use: {
loader: "babel-loader",
options: {
presets: ["@babel/preset-env"],
},
},
exclude: /node_modules/,
},
],
},
target: "node",
externalsPresets: {
node: true,
},
externals: [nodeExternals()],
};

0 comments on commit 8db5f92

Please sign in to comment.