-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Try to use node resolution for module path
This will allow assets to be in external modules. Issue #3
- Loading branch information
Showing
6 changed files
with
79 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
# Binaries | ||
node_modules/ | ||
dist/ | ||
!__test__/node_modules | ||
|
||
# Coverage | ||
.nyc_output/ | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import * as pngImage from '../sub/folder/image.png' | ||
import svgImage from '../image.svg' | ||
import moduleImage from 'dummy/picture.svg' | ||
import defaultImage from '../reexport' | ||
import { image } from '../reexport' | ||
|
||
export default function getPath( | ||
type: 'fullImport' | 'defaultImport' | 'moduleImport' | 'defaultExport' | 'namedExport' | ||
): string { | ||
switch (type) { | ||
case 'fullImport': | ||
return pngImage | ||
case 'defaultImport': | ||
return svgImage | ||
case 'moduleImport': | ||
return moduleImage | ||
case 'defaultExport': | ||
return defaultImage | ||
case 'namedExport': | ||
return image | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters