0.6.1 • Published 28 days ago
@stylexjs/webpack-plugin v0.6.1
@stylexjs/webpack-plugin
Documentation Website
Installation
Install the package by using:
npm install --save-dev @stylexjs/webpack-plugin
or with yarn:
yarn add --dev @stylexjs/webpack-plugin
Add the following to your webpack.config.js
const StylexPlugin = require('@stylexjs/webpack-plugin');
const path = require('path');
const config = (env, argv) => ({
entry: {
main: './src/index.js',
},
output: {
path: path.resolve(__dirname, '.build'),
filename: '[name].js',
},
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
use: 'babel-loader',
},
],
},
plugins: [
// Ensure that the stylex plugin is used before Babel
new StylexPlugin({
filename: 'styles.[contenthash].css',
// get webpack mode and set value for dev
dev: argv.mode === 'development',
// Use statically generated CSS files and not runtime injected CSS.
// Even in development.
runtimeInjection: false,
// optional. default: 'x'
classNamePrefix: 'x',
// Required for CSS variable support
unstable_moduleResolution: {
// type: 'commonJS' | 'haste'
// default: 'commonJS'
type: 'commonJS',
// The absolute path to the root directory of your project
rootDir: __dirname,
},
}),
],
cache: true,
});
module.exports = config;
0.6.1
28 days ago
0.6.0
1 month ago
0.5.0
4 months ago
0.5.1
4 months ago
0.5.0-alpha.4
4 months ago
0.5.0-alpha.3
4 months ago
0.5.0-alpha.2
4 months ago
0.5.0-alpha.1
4 months ago
0.4.1
5 months ago
0.4.0
5 months ago
0.3.0
6 months ago
0.2.0-beta.20
8 months ago
0.2.0-beta.21
8 months ago
0.2.0-beta.22
7 months ago
0.2.0-beta.23
7 months ago
0.2.0-beta.24
7 months ago
0.2.0-beta.25
7 months ago
0.2.0-beta.26
6 months ago
0.2.0-beta.27
6 months ago
0.2.0-beta.12
11 months ago
0.2.0-beta.13
10 months ago
0.2.0-beta.14
10 months ago
0.2.0-beta.15
10 months ago
0.2.0-beta.16
10 months ago
0.2.0-beta.17
9 months ago
0.2.0-beta.18
9 months ago
0.2.0-beta.19
9 months ago
0.2.0-beta.11
11 months ago
0.2.0-beta.10
1 year ago
0.2.0-beta.9
1 year ago
0.2.0-beta.8
1 year ago
0.1.0-beta.7
2 years ago
0.1.0-beta.6
2 years ago
0.1.0-beta.5
2 years ago
0.1.0-beta.4
2 years ago
0.1.0-beta.3
2 years ago
0.1.0-beta.2
2 years ago
0.1.0-beta.1
2 years ago