Comments (2)
I have a fix. Just need to use different options to the Uglify when debugging. Must still compress, but don't mangle and beautify the output again.
// Optimize the bundle in release (production) mode
if (!DEBUG) {
config.plugins.push(new webpack.optimize.DedupePlugin())
}
// Must always Uglify somehow or it won't work in IE8
const uglyOptions = !DEBUG ? {
compress: {
warnings: VERBOSE,
typeofs: false, // suggested for IE10 or less
screw_ie8: false
},
mangle: { screw_ie8: false },
output: { screw_ie8: false }
} : {
mangle: false,
compress: {
drop_debugger: false,
/* could set lots more settings false to leave the code as is. */
typeofs: false, // suggested for IE10 or less
warnings: VERBOSE,
screw_ie8: false
},
output: {
beautify: true,
comments: true,
bracketize: true,
indent_level: 2,
keep_quoted_props: true,
/* more settings to your liking... */
screw_ie8: false
},
};
config.plugins.push(new webpack.optimize.UglifyJsPlugin(uglyOptions))
if (!DEBUG) {
config.plugins.push(new webpack.optimize.AggressiveMergingPlugin())
config.module.loaders
.find(x => x.loader === 'babel-loader').query.plugins
.unshift(
'transform-react-remove-prop-types',
'transform-react-constant-elements',
'transform-react-inline-elements',
'transform-es3-modules-literals',
'transform-es3-member-expression-literals',
'transform-es3-property-literals'
)
}
from react-static-boilerplate.
Thank you.
Fix 4c38aef
from react-static-boilerplate.
Related Issues (14)
- IE8 下 slice 错误 HOT 1
- 你好,除了修改Main.js文件热更新有效,别的文件的修改都无效 HOT 1
- 服务端渲染可以吗? HOT 1
- IE8出错 HOT 2
- IE8中点击示例的直接跳转 HOT 4
- 路由不兼容ie8,火狐,谷歌等。。。 HOT 1
- build出来的代码放在服务器上页面上只渲染了一个 noscript HOT 1
- 使用React15+React Router4能兼容IE8吗? HOT 2
- 引发了异常但未捕获错误 HOT 15
- react-hot-loader 在什么地方配置的? HOT 1
- 在IE8下无法运行 HOT 1
- IE8 have an error HOT 1
- Hot reloading is very slow/模块热替换速度很慢 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-static-boilerplate.