wp-blank-scripts 3.0.0-beta.4 → 3.0.0-beta.6

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
@@ -2,7 +2,26 @@
2
2
 
3
3
  CLI and build tool for Wordpress projects.
4
4
 
5
- ### Project Structure
5
+ ## Upgrade to v3
6
+
7
+ Surprisingly there are no breaking changes.
8
+
9
+ **v3 Warnings**
10
+
11
+ #### Sass division outside of calc() deprecated
12
+
13
+ Deprecation Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.
14
+ Recommendation: math.div(-$grid-gutter, 2) or calc(-1 * $grid-gutter / 2). More info and automated migrator: https://sass-lang.com/d/slash-div
15
+
16
+ Fix:
17
+
18
+ ```
19
+ npm install -g sass-migrator
20
+ sass-migrator division **/*.scss
21
+
22
+ ```
23
+
24
+ ## Project Structure
6
25
 
7
26
  ```
8
27
  /
@@ -1,4 +1,5 @@
1
1
  module.exports = {
2
+ parser: 'babel',
2
3
  printWidth: 100,
3
4
  tabWidth: 2,
4
5
  useTabs: false,
@@ -165,7 +165,6 @@ module.exports = async (envConfig = {}, buildOptions, failOnError = false) => {
165
165
 
166
166
  if (stats.hasErrors()) {
167
167
  info.errors.forEach((error) => {
168
- console.log(error);
169
168
  logger.error(chalk.red(error));
170
169
  });
171
170
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wp-blank-scripts",
3
- "version": "3.0.0-beta.4",
3
+ "version": "3.0.0-beta.6",
4
4
  "description": "Personal Wordpress Scripts",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -31,8 +31,9 @@
31
31
  "author": "ViVO Digital",
32
32
  "license": "ISC",
33
33
  "dependencies": {
34
- "@hot-loader/react-dom": "^17.0.2",
35
34
  "@prettier/plugin-php": "^0.19.6",
35
+ "@swc/cli": "^0.1.62",
36
+ "@swc/core": "^1.3.67",
36
37
  "browser-sync": "^2.29.3",
37
38
  "chalk": "4.1.2",
38
39
  "copy-webpack-plugin": "^11.0.0",
@@ -66,7 +67,6 @@
66
67
  "postcss-preset-env": "^8.5.0",
67
68
  "prettier": "^2.8.8",
68
69
  "raw-loader": "^4.0.2",
69
- "react-hot-loader": "^4.13.1",
70
70
  "replace-in-file": "^7.0.1",
71
71
  "rimraf": "^5.0.1",
72
72
  "rsync": "^0.6.1",
@@ -50,11 +50,13 @@ function makeReactWebpackConfig(options) {
50
50
  test: /\.[jt]sx?$/,
51
51
  exclude: /node_modules\/(?!(dom7|swiper)\/)/,
52
52
  use: {
53
- loader: 'esbuild-loader',
53
+ loader: 'swc-loader',
54
54
  options: {
55
- loader: 'jsx',
56
- jsxFactory: 'React.createElement',
57
- target: 'es2015',
55
+ jsc: {
56
+ parser: {
57
+ jsx: true,
58
+ },
59
+ },
58
60
  },
59
61
  },
60
62
  },
@@ -198,13 +200,8 @@ function makeReactWebpackConfig(options) {
198
200
  };
199
201
 
200
202
  if (!isProd) {
201
- config.entry.main = [
202
- 'webpack-hot-middleware/client',
203
- 'react-hot-loader/patch',
204
- config.entry.main,
205
- ];
203
+ config.entry.main = ['webpack-hot-middleware/client', config.entry.main];
206
204
  config.plugins.push(new webpack.HotModuleReplacementPlugin());
207
- config.resolve.alias['react-dom'] = '@hot-loader/react-dom';
208
205
  }
209
206
 
210
207
  return config;