Skip to content

Commit

Permalink
fix: webpackIgnore statement
Browse files Browse the repository at this point in the history
  • Loading branch information
jorenbroekema committed Oct 27, 2023
1 parent 111f443 commit a3ad58b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/dirty-monkeys-fetch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@tokens-studio/sd-transforms': patch
---

Fix the webpackIgnore statement to use single \*. For NextJS integration (webpack).
2 changes: 1 addition & 1 deletion src/registerTransforms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export async function registerTransforms(sd: Core, transformOpts?: TransformOpti
// NodeJS env and no passed SD? let's register on our installed SD
// We're in ESM, but style-dictionary is CJS only, so we need module.createRequire
if (!isBrowser && _sd === undefined) {
const module = await import(/** webpackIgnore: true */ 'node:module');
const module = await import(/* webpackIgnore: true */ 'node:module');
const mod = module.default;
const require = mod.createRequire(import.meta.url);
_sd = require('style-dictionary');
Expand Down

0 comments on commit a3ad58b

Please sign in to comment.