@stylexswc/webpack-plugin 0.4.1-dev.1 → 0.4.1-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Webpack plugin with NAPI-RS StyleX compiler integration
2
2
 
3
3
  `Webpack plugin` for an unofficial
4
- [`napi-rs`](https://github.com/dwlad90/stylex-swc-plugin/tree/master/crates/stylex-rs-compiler)
4
+ [`napi-rs`](https://github.com/dwlad90/stylex-swc-plugin/tree/develop/crates/stylex-rs-compiler)
5
5
  compiler that includes the StyleX SWC code transformation under the hood.
6
6
 
7
7
  ## Installation
@@ -52,4 +52,4 @@ The options are similar like `@stylexjs/babel-plugin` and can be found [here](ht
52
52
  ## Documentation
53
53
 
54
54
  * [StyleX Documentation](https://stylexjs.com)
55
- * [NAPI-RS compiler for StyleX](https://github.com/Dwlad90/stylex-swc-plugin/tree/master/crates/stylex-rs-compiler)
55
+ * [NAPI-RS compiler for StyleX](https://github.com/Dwlad90/stylex-swc-plugin/tree/develop/crates/stylex-rs-compiler)
package/dist/index.js CHANGED
@@ -90,6 +90,9 @@ class StylexPlugin {
90
90
  const getContentHash = (source) => {
91
91
  const { outputOptions } = compilation;
92
92
  const { hashDigest, hashDigestLength, hashFunction, hashSalt } = outputOptions;
93
+ if (!hashFunction) {
94
+ throw new Error('webpack output options must have a hashFunction');
95
+ }
93
96
  const hash = compiler.webpack.util.createHash(hashFunction);
94
97
  if (hashSalt) {
95
98
  hash.update(hashSalt);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stylexswc/webpack-plugin",
3
3
  "description": "Stylex webpack plugin with NAPI-RS compiler",
4
- "version": "0.4.1-dev.1",
4
+ "version": "0.4.1-rc.2",
5
5
  "config": {
6
6
  "scripty": {
7
7
  "path": "../../scripts/packages"
@@ -12,12 +12,12 @@
12
12
  },
13
13
  "devDependencies": {
14
14
  "@babel/types": "^7.23.9",
15
- "@stylexswc/eslint-config": "0.4.1-dev.1",
16
- "@stylexswc/rs-compiler": "0.4.1-dev.1",
17
- "@stylexswc/typescript-config": "0.4.1-dev.1",
15
+ "@stylexswc/eslint-config": "0.4.1-rc.2",
16
+ "@stylexswc/rs-compiler": "0.4.1-rc.2",
17
+ "@stylexswc/typescript-config": "0.4.1-rc.2",
18
18
  "@types/babel__core": "^7.20.5",
19
- "@types/node": "^20.12.11",
20
- "webpack": "^5.88.2"
19
+ "@types/node": "^22.5.1",
20
+ "webpack": "^5.94.0"
21
21
  },
22
22
  "files": [
23
23
  "dist"