Skip to content

Commit 31c29df

Browse files
authored
refactor: update import paths to fix build step (#1452)
1 parent 6492978 commit 31c29df

File tree

6 files changed

+2219
-14
lines changed

6 files changed

+2219
-14
lines changed

examples/advanced/node-modules-as-config-and-properties/components/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import button from './button.js';
1+
import button from './button/index.js';
22

33
export default {
44
component: {

examples/advanced/node-modules-as-config-and-properties/config.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import StyleDictionary from 'style-dictionary';
22
import { formats, transforms, transformGroups, transformTypes } from 'style-dictionary/enums';
3-
import tokens from './tokens.js';
3+
import tokens from './tokens/index.js';
44
// Rather than have Style Dictionary handle the merging of token files,
55
// you could use node module export/require to do it yourself. This will
66
// allow you to not have to copy object namespaces like you normally would.
@@ -87,7 +87,7 @@ export default {
8787

8888
scss: {
8989
// This works, we can create new transform arrays on the fly and edit built-ins
90-
transforms: StyleDictionary.hooks.scss.concat(colorRgb),
90+
transforms: StyleDictionary.hooks.scss?.concat(colorRgb),
9191
buildPath: buildPath,
9292
files: [
9393
{
@@ -98,7 +98,7 @@ export default {
9898
},
9999

100100
js: {
101-
transforms: StyleDictionary.hooks.js.concat('myRegisteredTransform'),
101+
transforms: StyleDictionary.hooks.js?.concat('myRegisteredTransform'),
102102
buildPath: buildPath,
103103
// If you want to get super fancy, you can use node modules
104104
// to create a tokens object first, and then you can

0 commit comments

Comments
 (0)