29 lines
No EOL
608 B
JavaScript
29 lines
No EOL
608 B
JavaScript
import { dirname } from 'path';
|
|
import { fileURLToPath } from 'url';
|
|
|
|
/**
|
|
* @type import("webpack").Configuration
|
|
*/
|
|
export default {
|
|
target: "node",
|
|
entry: "./src/app.ts",
|
|
output: {
|
|
path: dirname(fileURLToPath(import.meta.url)),
|
|
filename: "dist/app.cjs",
|
|
chunkFormat: false
|
|
},
|
|
resolve: {
|
|
extensions: [".js", ".ts"]
|
|
},
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.(?:js|ts)$/,
|
|
exclude: /node_modules/,
|
|
use: [
|
|
"babel-loader"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
} |