Package Exports
- babel-plugin-transform-scss
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 (babel-plugin-transform-scss) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
babel-plugin-transform-scss
Babel plugin for converting scss or sass imports to css and embedding them in the head of the document
This plugin can be used for replacement of sass-loader
How it works
This plugin will convert all scss or sass imports to the standard <style> attribute. For example:
import React from 'react'
import 'style.scss'
const Button = () => {
return (
<div className="button">
Custom button
</div>
)
}
export default Buttonimport "style.scss" will be transformed to css and will be added to the head of the document:
<style data-scss-component="Button_style">
.button {
display: flex;
justify-content: space-around;
}
</style>