From 2b5809f9124338dd31895bbc3cd7b2d47aa21c33 Mon Sep 17 00:00:00 2001 From: Jessie Mongeon <133128541+jessiemongeon1@users.noreply.github.com> Date: Mon, 30 Sep 2024 10:32:43 -0500 Subject: [PATCH] Update webpack.mdx --- .../web-apps/application-frontends/webpack.mdx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/developer-docs/web-apps/application-frontends/webpack.mdx b/docs/developer-docs/web-apps/application-frontends/webpack.mdx index 1db848f87d..06227f9a54 100644 --- a/docs/developer-docs/web-apps/application-frontends/webpack.mdx +++ b/docs/developer-docs/web-apps/application-frontends/webpack.mdx @@ -34,7 +34,10 @@ module: { If your application does not use `dfx` to run your build script, you can provide the variables yourself. For example: ``` -DFX_NETWORK=ic NODE_ENV=production HELLO_CANISTER_ID=rrkah... npm run build +export DFX_NETWORK=ic +export NODE_ENV=production +export HELLO_CANISTER_ID=j2o3j-fiaaa-aaaab-qbifa-cai +npm run build ``` ### Ensuring Node.js is available in a project @@ -64,7 +67,7 @@ You may want to use a bundler other than webpack. Per-bundler instructions are n - #### Step 4: Modify `declarations//index.js` and replace `process.env._CANISTER_ID` with the equivalent pattern for environment variables for your bundler. -    - Alternately, hardcode the canister ID if that is your preferred workflow. +Alternately, hardcode the canister ID if that is your preferred workflow. - #### Step 5: Commit the declarations and import them in your codebase. @@ -146,4 +149,4 @@ function addElement () { - #### Step 8: Refresh the browser or wait for it to refresh on its own to see your change. -When you are done working on the frontend for your project, you can stop the webpack development server by pressing `Control-C`. \ No newline at end of file +When you are done working on the frontend for your project, you can stop the webpack development server by pressing `Control-C`.