@autobest-ui/scripts 3.0.1 → 3.0.3

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/bin/api.js CHANGED
File without changes
package/bin/spa.js CHANGED
File without changes
package/bin/ssr.js CHANGED
File without changes
@@ -53,6 +53,8 @@ function getStyleLoaders({ isProd, isServer, isHotServer, isSass, moduleOption =
53
53
  {
54
54
  loader: require.resolve('sass-loader'),
55
55
  options: {
56
+ // 必须开启,供 resolve-url-loader 解析相对路径
57
+ sourceMap: true,
56
58
  // 增加环境变量,供sass使用
57
59
  additionalData: `$env: ${isProd ? 'production' : 'development'};`
58
60
  }
@@ -213,6 +215,7 @@ module.exports = (appConfig, extendEnv, { isProd, isServer, isHotServer }) => {
213
215
  extensions: ['.tsx', '.ts', '.js', 'scss', 'css']
214
216
  },
215
217
  plugins: [
218
+ new webpack.DefinePlugin(extendEnv.stringified),
216
219
  new ProgressBarPlugin({
217
220
  // eslint-disable-next-line no-useless-concat
218
221
  format: 'build [:bar] ' + ':percent' + ' (:elapsed seconds)',
@@ -242,10 +245,6 @@ module.exports = (appConfig, extendEnv, { isProd, isServer, isHotServer }) => {
242
245
  );
243
246
  }
244
247
 
245
- if (!isServer) {
246
- result.plugins.push(new webpack.DefinePlugin(extendEnv.stringified));
247
- }
248
-
249
248
  if (isProd && !isServer) {
250
249
  result.optimization = {
251
250
  chunkIds: 'named',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autobest-ui/scripts",
3
- "version": "3.0.1",
3
+ "version": "3.0.3",
4
4
  "private": false,
5
5
  "description": "utils for project tools",
6
6
  "bin": {