Skip to content

Commit

Permalink
Merge branch 'master' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
ig_jh committed Apr 28, 2024
2 parents b558e43 + e96d4e3 commit cb0cf3e
Show file tree
Hide file tree
Showing 3 changed files with 415 additions and 414 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/webpack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
- name: Upload Artifact
uses: actions/upload-artifact@main
with:
name: github-pages
name: github-pages.${{matrix.node-version}}
path: ${{ runner.temp }}/artifact.tar
retention-days: 1

Expand Down
18 changes: 12 additions & 6 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
const path = require("path"),
HtmlPlugin = require("html-webpack-plugin");

module.exports = (env, argv) => {
const config = (env, argv) => {
//@ts-check
/** @type {import("webpack").Configuration}*/
const output = {
entry: "./src/index.tsx",
module: {
Expand All @@ -27,15 +29,19 @@ module.exports = (env, argv) => {
path: path.resolve(__dirname, "dist"),
clean: true,
},
mode: "production",
};

if ("mode" in argv && argv.mode === "development") {
(output.devtool = "inline-source-map"),
(output.devServer = {
static: "./dist",
port: env.port ?? 3000,
});
output.mode = "development";
output.devtool = "inline-source-map";
output.devServer = {
static: "./dist",
port: env.port ?? 3000,
};
}

return output;
};

module.exports = config;
Loading

0 comments on commit cb0cf3e

Please sign in to comment.