Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hotfix: rax-app v3.0.8 #3817

Merged
merged 2 commits into from
Nov 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions packages/build-user-config/src/userConfig/polyfill.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ module.exports = (config, polyfill) => {
};
if (typeof polyfill === 'string') {
presetEnvParam.corejs = 3;
if (polyfill === 'usage') {
injectTransformRuntime(config);
} else if (polyfill === 'entry') {
if (polyfill === 'entry') {
const entries = config.toConfig().entry;
const rule = config.module.rule('polyfill').test(/\.jsx?|\.tsx?$/);
const fileList = [];
Expand All @@ -34,7 +32,12 @@ module.exports = (config, polyfill) => {
});
rule.use('polyfill-loader').loader(require.resolve('../utils/polyfillLoader')).options({});
addBablePlugins(config, [[require.resolve('../utils/babelPluginCorejsLock.js'), { fileList }]]);
} else {
injectTransformRuntime(config);
}
} else if (polyfill === false) {
// inject async/await polyfill
injectTransformRuntime(config);
}
processPresetEnv(config, presetEnvParam);
};
2 changes: 1 addition & 1 deletion packages/plugin-rax-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "build-plugin-rax-app",
"version": "6.0.0",
"version": "6.0.1",
"description": "The basic webpack configuration for rax project",
"author": "Rax Team",
"main": "lib/index.js",
Expand Down
4 changes: 2 additions & 2 deletions packages/plugin-rax-app/src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ module.exports = [
configWebpack: require('./userConfig/inlineStyle'),
validation: 'boolean'
},
{
{
name: 'polyfill',
defaultValue: 'usage'
defaultValue: false
},
{
name: 'compileDependencies',
Expand Down
4 changes: 3 additions & 1 deletion packages/plugin-rax-app/src/setDev.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ module.exports = function(api) {
let webMpa = false;
let weexMpa = false;
let krakenMpa = false;
let isFirstCompile = true;
const getWebpackEntry = (configs, configName) => {
const taskConfig = configs.find((webpackConfig) => webpackConfig.name === configName);
if (!taskConfig || !taskConfig.entry) {
Expand Down Expand Up @@ -121,7 +122,8 @@ module.exports = function(api) {
if (targets.includes(WEB)) {
console.log(highlightPrint(' [Web] Development server at: '));
// do not open browser when restart dev
const shouldOpenBrowser = !commandArgs.disableOpen && !process.env.RESTART_DEV;
const shouldOpenBrowser = !commandArgs.disableOpen && !process.env.RESTART_DEV && isFirstCompile;
isFirstCompile = false;
if (webEntryKeys.length > 0) {
let openEntries = [];
if (commandArgs.mpaEntry) {
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-rax-kraken/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "build-plugin-rax-kraken",
"version": "1.0.5",
"version": "1.0.6",
"description": "rax kraken app plugin",
"main": "lib/index.js",
"scripts": {
Expand Down
8 changes: 0 additions & 8 deletions packages/plugin-rax-kraken/src/setEntry.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,10 @@ const path = require('path');

module.exports = (config, context) => {
const { rootDir } = context;
const target = 'kraken';

// SPA
const appEntry = moduleResolve(formatPath(path.join(rootDir, './src/app')));
const entryConfig = config.entry('index');

config.module.rule('platform-loader')
.use('platform-loader')
.options({
platform: target,
});

entryConfig.add(appEntry);
};

Expand Down
6 changes: 3 additions & 3 deletions packages/rax-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rax-app",
"version": "3.0.7",
"version": "3.0.8",
"description": "command line interface and builtin plugin for rax app",
"author": "ice-admin@alibaba-inc.com",
"homepage": "https://github.com/alibaba/ice#readme",
Expand All @@ -16,11 +16,11 @@
"dependencies": {
"@alib/build-scripts": "^0.1.24",
"build-plugin-app-core": "0.1.23",
"build-plugin-rax-app": "6.0.0",
"build-plugin-rax-app": "6.0.1",
"build-plugin-ice-store": "1.7.8",
"build-plugin-rax-web": "1.0.6",
"build-plugin-rax-weex": "1.0.6",
"build-plugin-rax-kraken": "1.0.5",
"build-plugin-rax-kraken": "1.0.6",
"build-plugin-rax-miniapp": "1.1.0",
"build-plugin-ssr": "1.0.6",
"chokidar": "^3.3.1",
Expand Down