Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/superhawk610/gatsby-plugin-stylable
Gatsby plugin for enabling wix/stylable support.
https://github.com/superhawk610/gatsby-plugin-stylable
gatsby gatsby-plugin gatsby-plugin-stylable hacktoberfest stylable wix
Last synced: 3 months ago
JSON representation
Gatsby plugin for enabling wix/stylable support.
- Host: GitHub
- URL: https://github.com/superhawk610/gatsby-plugin-stylable
- Owner: superhawk610
- License: isc
- Created: 2019-06-06T17:17:13.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-03T23:34:08.000Z (about 2 years ago)
- Last Synced: 2024-10-29T23:10:40.217Z (3 months ago)
- Topics: gatsby, gatsby-plugin, gatsby-plugin-stylable, hacktoberfest, stylable, wix
- Language: JavaScript
- Homepage:
- Size: 640 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gatsby-plugin-stylable
![npm](https://img.shields.io/npm/v/gatsby-plugin-stylable.svg)
Gatsby plugin for enabling [wix/stylable](https://github.com/wix/stylable) support.
## Install
```
npm install --save gatsby-plugin-stylable
```## How to use
Just install this plugin and enable it in your `gatsby-config.js`.
```js
// gatsby-config.jsmodule.exports = {
plugins: [`gatsby-plugin-stylable`],
}
```If you have any other plugins that add CSS loaders to your Webpack config, make sure to place this plugin **after** them.
If you want to configure `@stylable/webpack-plugin`, you may pass additional configuration options as shown below (the default configuration is shown):
```js
// gatsby-config.jsmodule.exports = {
plugins: [
{
resolve: `gatsby-plugin-stylable`,
options: {
experimentalHMR: false,
optimize: {
classNameOptimizations: false,
shortNamespaces: false,
},
},
},
],
}
```**NOTE:** `optimize.classNameOptimizations` and `optimize.shortNamespaces` are disabled since they will break
production builds. Re-enable them at your own risk.## Options
This plugin support any configuration options available to `@stylable/webpack-plugin`. For a full list, see [here](https://github.com/wix/stylable/tree/master/packages/webpack-plugin#plugin-configuration-options).
## License
Copyright © 2019 Aaron Ross. Use of this project is governed by an [ISC license](LICENSE).