@ray-js/builder-mp 1.3.0-beta.3 → 1.3.1-beta.1

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.
Files changed (2) hide show
  1. package/lib/build.rjs.js +15 -0
  2. package/package.json +5 -5
package/lib/build.rjs.js CHANGED
@@ -49,6 +49,21 @@ class RjsBuild {
49
49
  .options({
50
50
  configFile: path_1.default.resolve(__dirname, './babel/configs/babel.config.js'),
51
51
  });
52
+ config.module
53
+ .rule('image-sources')
54
+ .test(/\.(png|jpe?g|gif|svg)$/i)
55
+ // @ts-ignore
56
+ .type('asset')
57
+ .parser({
58
+ dataUrlCondition: {
59
+ maxSize: 8 * 1024,
60
+ },
61
+ });
62
+ config.module
63
+ .rule('font-sources')
64
+ .test(/\.(ttf|eot|woff|woff2)$/)
65
+ // @ts-ignore
66
+ .type('asset/resource');
52
67
  config.output
53
68
  .set('filename', '[name].rjs')
54
69
  .set('libraryTarget', 'commonjs2')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/builder-mp",
3
- "version": "1.3.0-beta.3",
3
+ "version": "1.3.1-beta.1",
4
4
  "description": "Ray builder for mini program",
5
5
  "keywords": [
6
6
  "ray"
@@ -28,10 +28,10 @@
28
28
  "@ray-core/build-store": "^0.3.0-beta.4",
29
29
  "@ray-core/cli": "^0.3.0-beta.4",
30
30
  "@ray-core/ray": "^0.3.0-beta.4",
31
- "@ray-js/adapter": "^1.3.0-beta.3",
31
+ "@ray-js/adapter": "^1.3.1-beta.1",
32
32
  "@ray-js/rjs-for-wechat": "^0.0.3",
33
- "@ray-js/shared": "^1.3.0-beta.3",
34
- "@ray-js/types": "^1.3.0-beta.3",
33
+ "@ray-js/shared": "^1.3.1-beta.1",
34
+ "@ray-js/types": "^1.3.1-beta.1",
35
35
  "babel-loader": "^8.2.3",
36
36
  "babel-plugin-minify-dead-code-elimination": "^0.5.1",
37
37
  "babel-plugin-transform-prune-unused-imports": "^1.0.1",
@@ -62,6 +62,6 @@
62
62
  "email": "tuyafe@tuya.com"
63
63
  }
64
64
  ],
65
- "gitHead": "be72a5dad6214ebf9c6653df02956374c735c98e",
65
+ "gitHead": "81bd8c71794b8bc83d884f2c86856fece31fad7c",
66
66
  "repository": {}
67
67
  }