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

dva new myApp 启动后,IE下报语法错误 #1233

Closed
Bennes opened this issue Sep 19, 2017 · 12 comments
Closed

dva new myApp 启动后,IE下报语法错误 #1233

Bennes opened this issue Sep 19, 2017 · 12 comments

Comments

@Bennes
Copy link

Bennes commented Sep 19, 2017

Code to reproduce the issue: (请提供可复现的代码或者步骤)

dva new **,然后启动即可以发现

Expected behavior: (预期的正常效果)

初始化后正常显示

Actual behavior: (实际效果)

IE报语法错误

Versions of packages used: (哪个库的哪个版本出现的问题)

"antd": "^2.13.2",
"babel-plugin-import": "^1.4.0",
"babel-runtime": "^6.9.2",
"dva": "^2.0.3",
"dva-loading": "^1.0.2",
"react": "^15.4.0",
"react-dom": "^15.4.0"

@sorrycc

@sorrycc
Copy link
Member

sorrycc commented Sep 19, 2017

IE 什么版本?

@Bennes
Copy link
Author

Bennes commented Sep 19, 2017

"use strict";
eval("\n\nmodule.exports = () => {\n\tconst pattern = [\n\t\t'[\\u001B\\u009B][\\#;?](?:(?:(?:[a-zA-Z\\d](?:;[a-zA-Z\\d]))?\\u0007)',\n\t\t'(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))'\n\t].join('|');\n\n\treturn new RegExp(pattern, 'g');\n};\n\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTU4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL19hbnNpLXJlZ2V4QDMuMC4wQGFuc2ktcmVnZXgvaW5kZXguanM/MzAwYyJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG5cbm1vZHVsZS5leHBvcnRzID0gKCkgPT4ge1xuXHRjb25zdCBwYXR0ZXJuID0gW1xuXHRcdCdbXFxcXHUwMDFCXFxcXHUwMDlCXVtbXFxcXF0oKSM7P10qKD86KD86KD86W2EtekEtWlxcXFxkXSooPzo7W2EtekEtWlxcXFxkXSopKik/XFxcXHUwMDA3KScsXG5cdFx0Jyg/Oig/OlxcXFxkezEsNH0oPzo7XFxcXGR7MCw0fSkqKT9bXFxcXGRBLVBSWmNmLW50cXJ5PT48fl0pKSdcblx0XS5qb2luKCd8Jyk7XG5cblx0cmV0dXJuIG5ldyBSZWdFeHAocGF0dGVybiwgJ2cnKTtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9fYW5zaS1yZWdleEAzLjAuMEBhbnNpLXJlZ2V4L2luZGV4LmpzXG4vLyBtb2R1bGUgaWQgPSAxNThcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///158\n");

这一段报的,IE11,我模拟9,10,11都有这个问题

@sorrycc
Copy link
Member

sorrycc commented Sep 19, 2017

.roadhogrc 里配 "devtool": "" 试试。

@Bennes
Copy link
Author

Bennes commented Sep 19, 2017

谢谢,用npm run build的成果物IE访问没有该问题,你那边是否能重现?

我配置后,如下
{
"entry": ["src/login.js","src/index.js"],
"disableCSSModules":true,
"devtool": "",
"env": {
"development": {
"extraBabelPlugins": [
"dva-hmr",
"transform-runtime",
["import", { "libraryName": "antd", "style": "css" }]
]
},
"production": {
"extraBabelPlugins": [
"transform-runtime",
["import", { "libraryName": "antd", "style": "css" }]
]
}
},
"proxy": {
"/**.do": {
"target": "http://localhost:8080/",
"changeOrigin": true
}
}
}

@Bennes Bennes closed this as completed Sep 19, 2017
@spiroo
Copy link

spiroo commented Oct 8, 2017

我也碰到这个问题了,dva new xx出来得项目,启动后IE11下报错。
image

dva-cli:0.8.1

@grunmin
Copy link

grunmin commented Oct 23, 2017

开了devtool之后build出来的文件, IE访问会报语法错误.
ps: 生产环境开devtool是因为接入sentry监控需要sourcemap
dva版本: 1.2.1

@afc163
Copy link
Contributor

afc163 commented Nov 22, 2017

"devtool": "", 貌似没有效果,https://github.com/ant-design/ant-design-pro 启动后在 IE11 依然报错。



/***/ }),
/* 188 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


module.exports = () => {
	const pattern = [
		'[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[a-zA-Z\\d]*)*)?\\u0007)',
		'(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))'
	].join('|');

	return new RegExp(pattern, 'g');
};

@afc163
Copy link
Contributor

afc163 commented Nov 22, 2017

@yesmeck
Copy link
Contributor

yesmeck commented Nov 23, 2017

这个模块的问题 chalk/ansi-regex#15

@yesmeck
Copy link
Contributor

yesmeck commented Nov 23, 2017

@zjafei
Copy link

zjafei commented Nov 30, 2017

roadhog 0.6.0以后就有这样的问题了
但是打包出来没有问题
就是开发环境

@a298003154
Copy link

the same problem in IE9.
image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants