-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Update examples with hostProject Config, buildScripts (#18)
* chore: Update examples with hostProject Config, buildScripts * feat: added lock files
- Loading branch information
1 parent
b71b908
commit e08e96d
Showing
12 changed files
with
1,814 additions
and
778 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// this file is not intended to be run directly, but rather to be run npm scripts | ||
|
||
const path = require('path'); | ||
const webpack = require('webpack'); | ||
|
||
function main() { | ||
console.log("Bundling server.mjs..."); | ||
|
||
webpack({ | ||
entry: "./server.mjs", | ||
output: { | ||
filename: 'server.js', | ||
path: path.resolve(__dirname, '../dist'), | ||
libraryTarget: 'commonjs2', | ||
clean: true | ||
}, | ||
resolve: { | ||
extensions: ['.js', '.mjs'] | ||
}, | ||
target: 'node', | ||
mode: 'production', | ||
externals: { | ||
"better-sqlite3": "better-sqlite3" | ||
} | ||
}).run((err, _stats) => { | ||
if (err) { | ||
console.error("Error bundling server.mjs:", err); | ||
return; | ||
} | ||
console.log("Bundled server.mjs file successfully."); | ||
}) | ||
|
||
} | ||
|
||
main(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.