@ray-js/builder-mp 1.2.7 → 1.2.9

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
@@ -46,6 +46,21 @@ class RjsBuild {
46
46
  .options({
47
47
  configFile: path_1.default.resolve(__dirname, './babel/configs/babel.config.js'),
48
48
  });
49
+ config.module
50
+ .rule('image-sources')
51
+ .test(/\.(png|jpe?g|gif|svg)$/i)
52
+ // @ts-ignore
53
+ .type('asset')
54
+ .parser({
55
+ dataUrlCondition: {
56
+ maxSize: 8 * 1024,
57
+ },
58
+ });
59
+ config.module
60
+ .rule('font-sources')
61
+ .test(/\.(ttf|eot|woff|woff2)$/)
62
+ // @ts-ignore
63
+ .type('asset/resource');
49
64
  config.output
50
65
  .set('filename', '[name].rjs')
51
66
  .set('libraryTarget', 'commonjs2')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/builder-mp",
3
- "version": "1.2.7",
3
+ "version": "1.2.9",
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.2.6",
29
29
  "@ray-core/cli": "^0.2.6",
30
30
  "@ray-core/ray": "^0.2.6",
31
- "@ray-js/adapter": "^1.2.7",
31
+ "@ray-js/adapter": "^1.2.9",
32
32
  "@ray-js/rjs-for-wechat": "^0.0.3",
33
- "@ray-js/shared": "^1.2.7",
34
- "@ray-js/types": "^1.2.7",
33
+ "@ray-js/shared": "^1.2.9",
34
+ "@ray-js/types": "^1.2.9",
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": "71baef5248b58ebf8e1b06894a2b510de77f6666",
65
+ "gitHead": "c48c7b037edc862183d6c7313dd2c64fc3cba092",
66
66
  "repository": {}
67
67
  }