@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 +0 -0
- package/bin/spa.js +0 -0
- package/bin/ssr.js +0 -0
- package/common/webpack.common.js +3 -4
- package/package.json +1 -1
package/bin/api.js
CHANGED
|
File without changes
|
package/bin/spa.js
CHANGED
|
File without changes
|
package/bin/ssr.js
CHANGED
|
File without changes
|
package/common/webpack.common.js
CHANGED
|
@@ -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',
|