swico 2.0.0-beta.5 → 2.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "swico",
3
- "version": "2.0.0-beta.5",
3
+ "version": "2.0.0-beta.6",
4
4
  "description": "Simple, efficient, and practical front-end framework",
5
5
  "main": "./src/index.js",
6
6
  "types": "./src/index.d.ts",
@@ -116,6 +116,7 @@ const createCompileListener = (compiler) => {
116
116
  return;
117
117
  }
118
118
  if (stats === null || stats === void 0 ? void 0 : stats.hasWarnings()) {
119
+ console.log('warning', info);
119
120
  const warnings = info.warnings;
120
121
  warnings.some((item) => {
121
122
  const msg = item.message || item.stack;
@@ -4,6 +4,7 @@ export default function ({ projectPath, entryPath, env, customConfig }: GlobalDa
4
4
  output: {
5
5
  path: string;
6
6
  filename: string;
7
+ cssFilename: string;
7
8
  assetModuleFilename: string;
8
9
  publicPath: string;
9
10
  clean: boolean;
@@ -45,7 +45,8 @@ function default_1({ projectPath, entryPath, env, customConfig }) {
45
45
  entry: entryPath,
46
46
  output: {
47
47
  path: path_1.default.join(projectPath, '/dist'),
48
- filename: 'js/[name].[chunkhash].js',
48
+ filename: 'js/[name].[id].js',
49
+ cssFilename: 'css/[name].[contenthash].css',
49
50
  assetModuleFilename: 'assets/[name]_[chunkhash][ext]',
50
51
  publicPath,
51
52
  clean: true
@@ -178,10 +179,6 @@ function default_1({ projectPath, entryPath, env, customConfig }) {
178
179
  },
179
180
  hash: true
180
181
  }),
181
- new core_1.rspack.CssExtractRspackPlugin({
182
- filename: env === 'dev' ? 'css/[name].css' : 'css/[name].[contenthash].css',
183
- ignoreOrder: true
184
- }),
185
182
  ...((customBaseConfig === null || customBaseConfig === void 0 ? void 0 : customBaseConfig.plugins) || config_1.initConfig.plugins)
186
183
  ]
187
184
  };
@@ -4,10 +4,14 @@ export default function ({ projectPath, entryPath, env, customConfig }: GlobalDa
4
4
  output: {
5
5
  path: string;
6
6
  filename: string;
7
+ cssFilename: string;
7
8
  assetModuleFilename: string;
8
9
  publicPath: string;
9
10
  clean: boolean;
10
11
  };
12
+ experiments: {
13
+ css: boolean;
14
+ };
11
15
  target: string[];
12
16
  module: {
13
17
  parser: {
@@ -47,11 +47,15 @@ function default_1({ projectPath, entryPath, env, customConfig }) {
47
47
  entry: entryPath,
48
48
  output: {
49
49
  path: path_1.default.join(projectPath, '/dist'),
50
- filename: 'js/[name].[chunkhash].js',
51
- assetModuleFilename: 'assets/[name]_[chunkhash][ext]',
50
+ filename: 'js/[name].[id].js',
51
+ cssFilename: 'css/[name].[contenthash].css',
52
+ assetModuleFilename: 'assets/[name]_[id][ext]',
52
53
  publicPath,
53
54
  clean: true
54
55
  },
56
+ experiments: {
57
+ css: true
58
+ },
55
59
  target: ['web', 'es5'],
56
60
  module: {
57
61
  parser: {
@@ -149,10 +153,6 @@ function default_1({ projectPath, entryPath, env, customConfig }) {
149
153
  },
150
154
  hash: true
151
155
  }),
152
- new core_1.CssExtractRspackPlugin({
153
- filename: env === 'dev' ? 'css/[name].css' : 'css/[name].[contenthash].css',
154
- ignoreOrder: true
155
- }),
156
156
  ...((customBaseConfig === null || customBaseConfig === void 0 ? void 0 : customBaseConfig.plugins) || config_1.initConfig.plugins)
157
157
  ]
158
158
  };