Skip to content

Commit

Permalink
feat/react-global (#261)
Browse files Browse the repository at this point in the history
* feat: add default value standalone

* feat: add default value standalone

* feat: add default value standalone in build file

* feat: changeset
  • Loading branch information
sgimama authored Jun 12, 2024
1 parent e037e51 commit 51cbd2b
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changeset/lovely-monkeys-marry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'gdu': patch
---

Add standalone flag in build file
5 changes: 5 additions & 0 deletions .changeset/polite-ghosts-speak.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'gdu': patch
---

Add default standalone value
2 changes: 1 addition & 1 deletion packages/gdu/commands/build/buildSPA.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const buildSPA = async (guruConfig: GuruConfig, tenant: string) => {

// eslint-disable-next-line unicorn/prefer-prototype-methods
const webpackConfigs: Configuration[] = hooks.webpackConfig.call(
makeWebpackConfig(void 0, false, tenant),
makeWebpackConfig(void 0, false, tenant, guruConfig?.standalone),
);

const compiler = webpack(webpackConfigs);
Expand Down
2 changes: 1 addition & 1 deletion packages/gdu/commands/start/runSPA.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const runSPA = async (guruConfig: GuruConfig, isDebug) => {

// eslint-disable-next-line unicorn/prefer-prototype-methods
const webpackConfig: Configuration = hooks.webpackConfig
.call(webpackConfigs(appEnv, isDebug, null, guruConfig.standalone))
.call(webpackConfigs(appEnv, isDebug, null, guruConfig?.standalone))
.find(({ name }) => name === appEnv);

const consumerHtmlTemplate = getConsumerHtmlTemplate(guruConfig);
Expand Down
2 changes: 1 addition & 1 deletion packages/gdu/config/webpack/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const buildConfigs = (
env = process.env.APP_ENV,
isDebug: boolean,
tenant?: string,
standalone?: boolean,
standalone: boolean = true,
): Configuration[] => {
const buildEnvs = getBuildEnvs(env);
return buildEnvs.map((buildEnv) => ({
Expand Down
4 changes: 2 additions & 2 deletions packages/gdu/config/webpack/webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export const baseOptions = (
buildEnv,
isMultiEnv: boolean,
isDebug = false,
standalone = true,
standalone?: boolean,
): Configuration => {
const guruConfig = getGuruConfig();
return {
Expand Down Expand Up @@ -428,7 +428,7 @@ export const makeWebpackConfig = (
buildEnv: BuildEnv,
isMultiEnv: boolean,
tenant?: string,
standalone = true,
standalone?: boolean,
): Configuration => {
const { outputPath, isTenanted } = getGuruConfig();
return {
Expand Down

0 comments on commit 51cbd2b

Please sign in to comment.