@douyinfe/semi-rspack-plugin 2.85.0-alpha.0 → 2.85.0-beta.0

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/rule.js +17 -6
  2. package/package.json +2 -2
package/lib/rule.js CHANGED
@@ -12,6 +12,7 @@ function createSourceSuffixLoaderRule(_opts) {
12
12
  exports.createSourceSuffixLoaderRule = createSourceSuffixLoaderRule;
13
13
  function createThemeLoaderRule(opts) {
14
14
  const themeOptions = {};
15
+ const scssLoader = require.resolve('sass-loader');
15
16
  if (typeof opts.theme === 'object') {
16
17
  Object.assign(themeOptions, opts.theme);
17
18
  }
@@ -29,27 +30,37 @@ function createThemeLoaderRule(opts) {
29
30
  test: /@douyinfe(\/|\\)+semi-(ui|icons|foundation)(\/|\\)+lib(\/|\\)+.+\.scss$/,
30
31
  use: [{ loader: constants_1.THEME_LOADER, options }],
31
32
  };
33
+ let commonLoader = [
34
+ {
35
+ loader: scssLoader,
36
+ options: {
37
+ sassOptions: {
38
+ silenceDeprecations: ['import', 'legacy-js-api', 'global-builtin'],
39
+ },
40
+ }
41
+ }
42
+ ];
32
43
  if (opts.webComponentPath) {
33
- const commonLoader = [
44
+ commonLoader = [
34
45
  { loader: "raw-loader" },
35
46
  { loader: constants_1.EXTRACT_CSS_LOADER },
36
47
  {
37
48
  loader: 'css-loader',
38
49
  options: { sourceMap: false }
39
50
  },
40
- { loader: 'sass-loader' }
41
- ];
42
- loaderInfo.use = [
43
51
  ...commonLoader,
44
- ...loaderInfo.use
45
52
  ];
46
53
  }
54
+ loaderInfo.use = [
55
+ ...commonLoader,
56
+ ...loaderInfo.use
57
+ ];
47
58
  return loaderInfo;
48
59
  }
49
60
  exports.createThemeLoaderRule = createThemeLoaderRule;
50
61
  function createOmitCssLoaderRule(_opts) {
51
62
  return {
52
- test: /@douyinfe(\/|\\)+semi-(ui|icons)(\/|\\)+.+\.js$/,
63
+ test: /@douyinfe(\/|\\)+semi-[^/]+(\/|\\)+.+env\.js$/,
53
64
  use: [{ loader: constants_1.OMIT_CSS_LOADER }],
54
65
  };
55
66
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@douyinfe/semi-rspack-plugin",
3
- "version": "2.85.0-alpha.0",
3
+ "version": "2.85.0-beta.0",
4
4
  "description": "",
5
5
  "homepage": "",
6
6
  "license": "MIT",
@@ -33,5 +33,5 @@
33
33
  "typescript": "^4",
34
34
  "webpack": "^5.77.0"
35
35
  },
36
- "gitHead": "553917e3cbca8b2d33ad5815c478517acc9d561a"
36
+ "gitHead": "33738dd3e18dad726469b193229b64bbf1f9c4d3"
37
37
  }