Skip to content

Commit

Permalink
Change require statement to import statement (#194)
Browse files Browse the repository at this point in the history
  • Loading branch information
trishrempel authored Sep 25, 2023
1 parent 589bfd7 commit 62e9ba6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/fast-lies-invite.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@shopify/i18next-shopify': patch
---

Resolve Vite production issues by replacing `require` statement with `import`
1 change: 1 addition & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ const config = {
copy({targets: [{src: './index.d.ts', dest: 'dist/types'}]}),
].concat(compress ? terser() : []),
output,
external: ['react'],
};

export default config;
2 changes: 1 addition & 1 deletion src/utils.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const {isValidElement, cloneElement} = require('react');
import {isValidElement, cloneElement} from 'react';

const arr = [];
const each = arr.forEach;
Expand Down

0 comments on commit 62e9ba6

Please sign in to comment.