Skip to content

Commit

Permalink
Merge pull request #10797 from murdos/fix-react
Browse files Browse the repository at this point in the history
fix(react): use type module
  • Loading branch information
murdos authored Sep 8, 2024
2 parents 159f11b + 25cac85 commit 5081572
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package tech.jhipster.lite.generator.client.react.core.domain;

import static tech.jhipster.lite.module.domain.JHipsterModule.*;
import static tech.jhipster.lite.module.domain.packagejson.NodeModuleFormat.MODULE;
import static tech.jhipster.lite.module.domain.packagejson.VersionSource.COMMON;
import static tech.jhipster.lite.module.domain.packagejson.VersionSource.REACT;

Expand Down Expand Up @@ -37,6 +38,7 @@ public JHipsterModule buildModule(JHipsterModuleProperties properties) {
.and()
.and()
.packageJson()
.type(MODULE)
.addDevDependency(packageName("@testing-library/dom"), REACT)
.addDevDependency(packageName("@testing-library/react"), REACT)
.addDevDependency(packageName("@types/node"), COMMON)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package tech.jhipster.lite.generator.client.react.security.jwt.domain;

import static tech.jhipster.lite.module.domain.JHipsterModule.*;
import static tech.jhipster.lite.module.domain.packagejson.NodeModuleFormat.MODULE;
import static tech.jhipster.lite.module.domain.packagejson.VersionSource.COMMON;
import static tech.jhipster.lite.module.domain.packagejson.VersionSource.REACT;

Expand Down Expand Up @@ -46,7 +45,6 @@ public JHipsterModule buildModule(JHipsterModuleProperties properties) {
//@formatter:off
return moduleBuilder(properties)
.packageJson()
.type(MODULE)
.addDependency(packageName("react-hook-form"), REACT)
.addDependency(packageName("axios"), REACT)
.addDependency(packageName("@nextui-org/react"), REACT)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ void shouldBuildModuleWithStyle() {

assertThatModuleWithFiles(module, packageJsonFile(), lintStagedConfigFile())
.hasFile("package.json")
.containing("\"type\": \"module\"")
.containing(nodeDependency("@testing-library/dom"))
.containing(nodeDependency("@testing-library/react"))
.containing(nodeDependency("@types/node"))
Expand Down

0 comments on commit 5081572

Please sign in to comment.