Shimmer: fixing import statements#4541
Conversation
|
@dzearing, looks good to me. Please give it a look. |
| @@ -1,5 +1,5 @@ | |||
| import * as React from 'react'; | |||
| import { Shimmer } from 'experiments/lib/Shimmer'; | |||
| import { Shimmer } from '../Shimmer'; | |||
There was a problem hiding this comment.
this should be @uifabric/experiments/lib/Shimmer
There was a problem hiding this comment.
@dzearing This is in the same package and linter is complaining about it. Why not ../Shimmer?
There was a problem hiding this comment.
The build is failing if I use @uifabric/experiments/lib/Shimmer
There was a problem hiding this comment.
ERROR in ./src/components/Shimmer/examples/Shimmer.Application.Example.tsx
Module not found: Error: Can't resolve '@uifabric/experiments/lib/Shimmer' in '/Users/vitaliebraga/Desktop/UIFabric/office-ui-fabric-react/packages/experiments/src/components/Shimmer/examples'
@ ./src/components/Shimmer/examples/Shimmer.Application.Example.tsx 11:16-60
@ ./src/components/Shimmer/ShimmerPage.tsx
@ ./src/demo/AppDefinition.tsx
@ ./src/demo/index.tsx
@ multi (webpack)-dev-server/client?http://localhost:4322 ./src/demo/index.tsx
ℹ 「wdm」: Failed to compile.
There was a problem hiding this comment.
This is a code example. A user reading it can't use your example when you are using relative paths in examples :)
There was a problem hiding this comment.
The project webpack config and tsconfig are messed up here and should be resolving @uifabric/experiments.
I'm ok checking this in, but we need to scrub these examples and the configs
|
@dzearing Good to merge? The import you commented about seems to be right. See comments above. |
Pull request checklist
$ npm run changeDescription of changes
Went through all files in Shimmer component and fixed imports and aligned them for better consistency in using them across the Shimmer component.
Plus added exports to the top level.