diff --git a/examples/dogfooding/package.json b/examples/dogfooding/package.json index e30e9f7..e4f7f3e 100644 --- a/examples/dogfooding/package.json +++ b/examples/dogfooding/package.json @@ -3,7 +3,7 @@ "version": "0.0.1", "private": true, "scripts": { - "build": "NODE_ENV='production' webpack --config webpack.config.js --mode production", + "build": "NODE_ENV=production webpack --config webpack.config.js --mode production", "start": "webpack-dev-server" }, "dependencies": { diff --git a/examples/dogfooding/webpack.config.js b/examples/dogfooding/webpack.config.js index 6a4d646..5762d37 100644 --- a/examples/dogfooding/webpack.config.js +++ b/examples/dogfooding/webpack.config.js @@ -1,11 +1,15 @@ const CopyWebpackPlugin = require("copy-webpack-plugin"); const path = require("path"); +const isProduction = process.env.NODE_ENV === 'production'; +const publicPath = isProduction ? '/dogfooding/' : '/'; + module.exports = { entry: "./src/index.ts", output: { path: path.resolve(__dirname, "build"), filename: "index.js", + publicPath: publicPath, }, experiments: { asyncWebAssembly: true,