Skip to content

Commit a72e7cb

Browse files
committed
Delete esbuild and webpack plugins
1 parent 5c527bb commit a72e7cb

30 files changed

+36
-10340
lines changed

README.md

+7-3
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,19 @@ This is the development monorepo for StyleX.
4242
- `examples`
4343
- Contains examples using StyleX and its integration with build tools.
4444
- `packages`
45-
- Contains the individual packages managed in the monorepo.
45+
- Contains the public and private packages managed in the monorepo.
4646
- [babel-plugin](https://github.com/facebook/stylex/blob/main/packages/babel-plugin)
47+
- [benchmarks](https://github.com/facebook/stylex/blob/main/packages/benchmarks)
4748
- [cli](https://github.com/facebook/stylex/blob/main/packages/cli)
49+
- [docs](https://github.com/facebook/stylex/blob/main/packages/docs)
4850
- [eslint-plugin](https://github.com/facebook/stylex/blob/main/packages/eslint-plugin)
49-
- [open-props](https://github.com/facebook/stylex/blob/main/packages/open-props)
51+
- [postcss-plugin](https://github.com/facebook/stylex/blob/main/packages/postcss-plugin)
5052
- [rollup-plugin](https://github.com/facebook/stylex/blob/main/packages/rollup-plugin)
53+
- [scripts](https://github.com/facebook/stylex/blob/main/packages/scripts)
5154
- [shared](https://github.com/facebook/stylex/blob/main/packages/shared)
55+
- [style-value-parser](https://github.com/facebook/stylex/blob/main/packages/style-value-parser)
5256
- [stylex](https://github.com/facebook/stylex/blob/main/packages/stylex)
53-
- [webpack-plugin](https://github.com/facebook/stylex/blob/main/packages/webpack-plugin)
57+
5458

5559
### Tasks
5660

package-lock.json

+29
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/docs/docs/learn/03-installation.mdx

-97
Original file line numberDiff line numberDiff line change
@@ -129,103 +129,6 @@ and esbuild.
129129
```
130130
</details>
131131

132-
<details>
133-
<summary>Webpack</summary>
134-
135-
<DevInstallExample dev={[`@stylexjs/webpack-plugin`]} />
136-
137-
```tsx title="webpack.config.js"
138-
const StylexPlugin = require('@stylexjs/webpack-plugin');
139-
const path = require('path');
140-
141-
const config = (env, argv) => ({
142-
entry: {
143-
main: './src/index.js',
144-
},
145-
output: {
146-
path: path.resolve(__dirname, '.build'),
147-
filename: '[name].js',
148-
},
149-
module: {
150-
rules: [
151-
{
152-
test: /\.js$/,
153-
exclude: /node_modules/,
154-
use: 'babel-loader',
155-
},
156-
],
157-
},
158-
plugins: [
159-
// Ensure that the stylex plugin is used before Babel
160-
new StylexPlugin({
161-
filename: 'styles.[contenthash].css',
162-
// get webpack mode and set value for dev
163-
dev: argv.mode === 'development',
164-
// Use statically generated CSS files and not runtime injected CSS.
165-
// Even in development.
166-
runtimeInjection: false,
167-
// optional. default: 'x'
168-
classNamePrefix: 'x',
169-
// Required for CSS variable support
170-
unstable_moduleResolution: {
171-
// type: 'commonJS' | 'haste'
172-
// default: 'commonJS'
173-
type: 'commonJS',
174-
// The absolute path to the root directory of your project
175-
rootDir: __dirname,
176-
},
177-
}),
178-
],
179-
cache: true,
180-
});
181-
182-
module.exports = config;
183-
```
184-
185-
</details>
186-
187-
<details>
188-
<summary>esbuild</summary>
189-
190-
<DevInstallExample dev={[`@stylexjs/esbuild-plugin`]} />
191-
192-
```tsx title="build.mjs"
193-
import esbuild from 'esbuild';
194-
import stylexPlugin from '@stylexjs/esbuild-plugin';
195-
import path from 'path';
196-
import { fileURLToPath } from 'url';
197-
198-
const __dirname = path.dirname(fileURLToPath(import.meta.url));
199-
200-
esbuild.build({
201-
entryPoints: ['src/index.js'],
202-
bundle: true,
203-
outfile: './build/bundle.js',
204-
minify: true,
205-
plugins: [
206-
stylexPlugin({
207-
// If set to 'true', bundler will inject styles in-line
208-
// Do not use in production
209-
dev: false,
210-
// Required. File path for the generated CSS file
211-
generatedCSSFileName: path.resolve(__dirname, 'build/stylex.css'),
212-
// Aliases for StyleX package imports
213-
// default: '@stylexjs/stylex'
214-
stylexImports: ['@stylexjs/stylex'],
215-
// Required for CSS variable support
216-
unstable_moduleResolution: {
217-
// type: 'commonJS' | 'haste'
218-
// default: 'commonJS'
219-
type: 'commonJS',
220-
// The absolute path to the root of your project
221-
rootDir: __dirname,
222-
},
223-
}),
224-
],
225-
})
226-
```
227-
</details>
228-
229132
Please refer to the
230133
[StyleX examples](https://github.com/facebook/stylex/tree/main/examples)
231134
for demonstrations on how to use each of these plugins.

packages/esbuild-plugin/.babelrc.cjs

-17
This file was deleted.

0 commit comments

Comments
 (0)