Webpack integration for Strato CSS framework
npm install @strato-css/webpackWebpack integration for Strato CSS framework. This plugin provides seamless integration with Webpack applications.
``bash`
pnpm add @strato-css/webpack
Add the plugin to your webpack.config.js:
`javascript
const StratoCSS = require('@strato-css/webpack');
module.exports = {
plugins: [
new StratoCSS()
]
};
`
`javascript
const StratoCSS = require('@strato-css/webpack');
module.exports = {
plugins: [
new StratoCSS({
// Presets
presets: [],
// Theme customization
theme: {
colors: {
primary: '#3b82f6'
}
},
// Additional rules
rules: [],
// Shortcuts
shortcuts: []
})
]
};
`
The plugin accepts all options from the Strato CSS generator:
- presets: Array of presets to usetheme
- : Custom theme configurationrules
- : Additional utility rulesshortcuts
- : Utility shortcutsvariants
- : Custom variants
`javascript
const path = require('path');
const StratoCSS = require('@strato-css/webpack');
module.exports = {
entry: './src/index.js',
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'bundle.js'
},
module: {
rules: [
{
test: /\.js$/,
use: 'babel-loader'
}
]
},
plugins: [
new StratoCSS()
]
};
`
`javascript
const path = require('path');
const { VueLoaderPlugin } = require('vue-loader');
const StratoCSS = require('@strato-css/webpack');
module.exports = {
entry: './src/index.js',
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'bundle.js'
},
module: {
rules: [
{
test: /\.vue$/,
loader: 'vue-loader'
}
]
},
plugins: [
new VueLoaderPlugin(),
new StratoCSS()
]
};
`
- ⚡️ Fast compilation
- 🔧 Full configuration support
- 📦 Tree-shaking
- 🎨 Preset system
- 🌙 Dark mode support
- 📱 Responsive utilities
- 🔄 Hot Module Replacement
`bashRun all tests
pnpm test
$3
`bash
Build the package
pnpm buildBuild in watch mode
pnpm dev
`$3
`bash
Run TypeScript type checking
pnpm typecheck
``MIT