You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When building your local dev site the resulting website does not include export-bundle.js or any of the other react projects and as a result the PersonaBar doesn't work.
Analysis
From a Slack discussion about this issue:
I figured out why the build was not generating the yarn js products on his local dev site. Hold on to your seat, here we go:
When DNN runs a build it passes through AEModule.build MSBuild script which calls “yarn run build”
This fires off lerna from the root package.json as “lerna run build --stream”
This then goes to each JS project listed in that package.json and finds their package.json and runs the “build” script
E.g. Sites.Web will have this “set NODE_ENV=production&&webpack -p”
Now the webpack.config.js for that project is loaded and you’ll find it attempts to establish mode as follows: const isProduction = process.env.NODE_ENV === “production”;
This is where things go wrong. It turns out this is not set to production by the command and now isProduction is false
The output path looks at whether we are in production mode or not and if not then we see if we have a local settings file. If you are a DNN developer, you will have one. This will then be used for output. Meaning that a proper production output path is not used but the development path.
I am not sure how we got here. I also cannot explain why NODE_ENV does not persist to the webpack config. I also cannot explain what if anything changed. I did not experience any issues because I still had (old) local copies in place which were being used.
Affected version
We can't establish how long this problem has persisted.
The text was updated successfully, but these errors were encountered:
Description of bug
When building your local dev site the resulting website does not include export-bundle.js or any of the other react projects and as a result the PersonaBar doesn't work.
Analysis
From a Slack discussion about this issue:
I figured out why the build was not generating the yarn js products on his local dev site. Hold on to your seat, here we go:
const isProduction = process.env.NODE_ENV === “production”;
I am not sure how we got here. I also cannot explain why NODE_ENV does not persist to the webpack config. I also cannot explain what if anything changed. I did not experience any issues because I still had (old) local copies in place which were being used.
Affected version
We can't establish how long this problem has persisted.
The text was updated successfully, but these errors were encountered: