swico 2.1.0-beta.5 → 2.1.0-beta.7

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.1.0-beta.5",
3
+ "version": "2.1.0-beta.7",
4
4
  "description": "Simple, efficient, and practical front-end framework",
5
5
  "main": "./src/index.js",
6
6
  "types": "./src/index.d.ts",
@@ -31,7 +31,6 @@
31
31
  "dependencies": {
32
32
  "@rspack/dev-server": "1.1.1",
33
33
  "@vue/compiler-sfc": "3.5.13",
34
- "autoprefixer": "10.3.7",
35
34
  "chalk": "4.1.2",
36
35
  "chokidar": "3.6.0",
37
36
  "commander": "12.0.0",
@@ -57,8 +56,7 @@
57
56
  "vue-router": "4.5.0",
58
57
  "vue-style-loader": "4.1.3",
59
58
  "webpack-bundle-analyzer": "4.9.1",
60
- "webpack-merge": "6.0.1",
61
- "@tailwindcss/postcss": "^4.1.7"
59
+ "webpack-merge": "6.0.1"
62
60
  },
63
61
  "devDependencies": {
64
62
  "@eslint/js": "9.24.0",
@@ -48,50 +48,13 @@ export default function ({ projectPath, entryPath, env, customConfig }: GlobalDa
48
48
  oneOf?: undefined;
49
49
  } | {
50
50
  oneOf: ({
51
- test: RegExp;
52
- type: string;
53
- use: {
54
- loader: string;
55
- options: {
56
- postcssOptions: {
57
- plugins: string[][];
58
- config: string;
59
- };
60
- };
61
- }[];
62
- generator?: undefined;
63
- loader?: undefined;
64
- } | {
65
51
  test: RegExp;
66
52
  type: string;
67
53
  use: (string | {
68
- loader: string;
69
- options: {
70
- postcssOptions: {
71
- plugins: string[][];
72
- };
73
- };
74
- })[];
75
- generator?: undefined;
76
- loader?: undefined;
77
- } | {
78
- test: RegExp;
79
- type: string;
80
- use: ({
81
- loader: string;
82
- options: {
83
- postcssOptions: {
84
- plugins: string[][];
85
- };
86
- api?: undefined;
87
- implementation?: undefined;
88
- };
89
- } | {
90
54
  loader: string;
91
55
  options: {
92
56
  api: string;
93
57
  implementation: string;
94
- postcssOptions?: undefined;
95
58
  };
96
59
  })[];
97
60
  generator?: undefined;
@@ -21,7 +21,7 @@ const sassLoader = require.resolve('sass-loader');
21
21
  const postcssLoader = require.resolve('postcss-loader');
22
22
  function default_1(_a) {
23
23
  return __awaiter(this, arguments, void 0, function* ({ projectPath, entryPath, env, customConfig }) {
24
- var _b, _c, _d, _e, _f, _g, _h;
24
+ var _b, _c, _d, _e, _f, _g;
25
25
  const customBaseConfig = customConfig.base;
26
26
  const getCustomAliasConfig = () => {
27
27
  const { alias } = customBaseConfig || {};
@@ -35,9 +35,8 @@ function default_1(_a) {
35
35
  };
36
36
  const publicPath = (_b = customBaseConfig === null || customBaseConfig === void 0 ? void 0 : customBaseConfig.publicPath) !== null && _b !== void 0 ? _b : config_1.initConfig.publicPath;
37
37
  const routerBase = (_d = (_c = customBaseConfig === null || customBaseConfig === void 0 ? void 0 : customBaseConfig.router) === null || _c === void 0 ? void 0 : _c.base) !== null && _d !== void 0 ? _d : config_1.initConfig.router.base;
38
- const cssMode = ((_e = customBaseConfig === null || customBaseConfig === void 0 ? void 0 : customBaseConfig.cssAuto) !== null && _e !== void 0 ? _e : config_1.initConfig.cssAuto) ? 'css/auto' : 'css';
39
38
  const basicPlugins = [];
40
- const defineConfigData = (_g = (_f = customConfig === null || customConfig === void 0 ? void 0 : customConfig.base) === null || _f === void 0 ? void 0 : _f.define) !== null && _g !== void 0 ? _g : {};
39
+ const defineConfigData = (_f = (_e = customConfig === null || customConfig === void 0 ? void 0 : customConfig.base) === null || _e === void 0 ? void 0 : _e.define) !== null && _f !== void 0 ? _f : {};
41
40
  const formatObj = yield (0, config_1.getFormatDefineVars)(defineConfigData);
42
41
  if (Object.keys(formatObj).length !== 0) {
43
42
  basicPlugins.push(new core_1.rspack.DefinePlugin(formatObj));
@@ -96,46 +95,19 @@ function default_1(_a) {
96
95
  oneOf: [
97
96
  {
98
97
  test: /\.css$/,
99
- type: cssMode,
100
- use: [
101
- {
102
- loader: postcssLoader,
103
- options: {
104
- postcssOptions: {
105
- plugins: [['autoprefixer'], ['@tailwindcss/postcss']],
106
- config: path_1.default.join(projectPath, '/postcss.config.mjs')
107
- }
108
- }
109
- }
110
- ]
98
+ type: 'css/auto',
99
+ use: [postcssLoader]
111
100
  },
112
101
  {
113
102
  test: /\.less$/,
114
- type: cssMode,
115
- use: [
116
- {
117
- loader: postcssLoader,
118
- options: {
119
- postcssOptions: {
120
- plugins: [['autoprefixer']]
121
- }
122
- }
123
- },
124
- lessLoader
125
- ]
103
+ type: 'css/auto',
104
+ use: [postcssLoader, lessLoader]
126
105
  },
127
106
  {
128
107
  test: /\.scss$/,
129
- type: cssMode,
108
+ type: 'css/auto',
130
109
  use: [
131
- {
132
- loader: postcssLoader,
133
- options: {
134
- postcssOptions: {
135
- plugins: [['autoprefixer']]
136
- }
137
- }
138
- },
110
+ postcssLoader,
139
111
  {
140
112
  loader: sassLoader,
141
113
  options: {
@@ -188,7 +160,7 @@ function default_1(_a) {
188
160
  },
189
161
  hash: true
190
162
  }),
191
- ...((_h = customBaseConfig === null || customBaseConfig === void 0 ? void 0 : customBaseConfig.plugins) !== null && _h !== void 0 ? _h : config_1.initConfig.plugins)
163
+ ...((_g = customBaseConfig === null || customBaseConfig === void 0 ? void 0 : customBaseConfig.plugins) !== null && _g !== void 0 ? _g : config_1.initConfig.plugins)
192
164
  ]
193
165
  };
194
166
  });
@@ -29,7 +29,6 @@ export interface GlobalSwicoConfigType {
29
29
  devtool?: string;
30
30
  externals?: any;
31
31
  router?: ConfigRouterType;
32
- cssAuto?: boolean;
33
32
  }
34
33
  export interface GlobalData {
35
34
  templateType?: GlobalSwicoConfigType['template'];
@@ -38,7 +37,7 @@ export interface GlobalData {
38
37
  templatePath: string;
39
38
  env?: 'dev' | 'prod';
40
39
  customConfig: {
41
- base: Pick<GlobalSwicoConfigType, 'plugins' | 'publicPath' | 'alias' | 'define' | 'devtool' | 'externals' | 'router' | 'template' | 'cssAuto'>;
40
+ base: Pick<GlobalSwicoConfigType, 'plugins' | 'publicPath' | 'alias' | 'define' | 'devtool' | 'externals' | 'router' | 'template'>;
42
41
  dev: Pick<GlobalSwicoConfigType, 'plugins' | 'proxy' | 'https' | 'devtool' | 'router'>;
43
42
  prod: Pick<GlobalSwicoConfigType, 'plugins' | 'console' | 'copy' | 'devtool' | 'router'>;
44
43
  };
@@ -77,8 +77,7 @@ const getProjectConfig = (env) => __awaiter(void 0, void 0, void 0, function* ()
77
77
  'devtool',
78
78
  'externals',
79
79
  'router',
80
- 'template',
81
- 'cssAuto'
80
+ 'template'
82
81
  ];
83
82
  configFileName = 'swico.ts';
84
83
  break;
@@ -267,7 +266,6 @@ const getFormatDefineVars = (defineVarsConfigData) => __awaiter(void 0, void 0,
267
266
  exports.getFormatDefineVars = getFormatDefineVars;
268
267
  exports.initConfig = {
269
268
  console: true,
270
- cssAuto: true,
271
269
  plugins: [],
272
270
  publicPath: '/',
273
271
  proxy: undefined,