Package Exports
- @workday/canvas-kit-css
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@workday/canvas-kit-css) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Canvas Kit CSS
The bundle package containing all modules of the Canvas CSS Kit.
Usage
Canvas Kit CSS uses tilde ~ imports to resolve imports to your project's node_modules directory.
This is done automatically in Webpack's sass-loader.
If you would like to import outside of webpack you have a few options you can pass to the SASS
importer option.
If you are using
node_sassyou can try a third part importer such asnode-sass-tilde-importerIf you are using
dart_sassyou will need your own custom importer, e.g.:
const tildeImporter = (url: string): {file: string} => {
if (url[0] === '~') {
url = `./node_modules/${url.substr(1)}`;
}
return {file: url};
};Troubleshooting:
In some cases your may need to add your node_modules directory to your the SASS includePaths
option.
You will then be able to import any scss file index.scss.
@import '~@workday/canvas-kit-css/index.scss';