代码拉取完成,页面将自动刷新
同步操作将从 云小飞/React_IE8_boilerplate 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
const webpack = require('webpack'),
path = require('path'),
HtmlWebpackPlugin = require('html-webpack-plugin'),
ExtractTextPlugin = require("extract-text-webpack-plugin"),
CleanWebpackPlugin = require('clean-webpack-plugin'),
autoprefixer = require('autoprefixer'),
es3ifyPlugin = require('es3ify-webpack-plugin');
const ROOT_PATH = path.resolve(__dirname, ".");
const BUILD_PATH = path.resolve(ROOT_PATH, 'build');
module.exports = {
entry: {
polyfill : 'babel-polyfill',
main : './src/index.js'
},
output: {
path: BUILD_PATH,
filename: 'js/[name].[hash:5].js'
},
//如果不需要react这段可以去掉
resolve: {
root : ['./scss'],
extensions: ['', '.js', '.jsx'],
alias: {
"react": "anujs/dist/ReactIE.js",
"react-dom": "anujs/dist/ReactIE.js",
'prop-types': 'anujs/lib/ReactPropTypes',
'devtools' : "anujs/lib/devtools",
'create-react-class': 'anujs/lib/createClass'
}
},
module: {
loaders: [
{test: /\.(js|jsx)(\?.*$|$)/,exclude: /node_modules/,loader: 'babel-loader'},
{test: /\.(png|jpg|gif|bmp|svg|swf)(\?.*$|$)/, loader: "url?limit=2048&name=img/[hash:5].[ext]" },
{test: /\.css$/,loader: "style!css"},
{test: /\.scss$/,loader: ExtractTextPlugin.extract("style", "css?modules=true&sourceMap=true!postcss!sass", {publicPath: "./"})},
],
postLoaders: [
// {test: /\.(js|jsx)(\?.*$|$)/,loader: "es3ify-loader"},
// {test: /\.(js|jsx)$/,loader: 'export-from-ie8/loader'}
]
},
postcss: function () {
return [autoprefixer];
},
plugins: [
new es3ifyPlugin(),
new ExtractTextPlugin("./css/[name].[hash:5].css"),
new HtmlWebpackPlugin({template : "src/index.html"}),
new webpack.optimize.UglifyJsPlugin({mangle : false, output : {keep_quoted_props:true}, compress : {properties:false, drop_console: true},comments:false}),
new CleanWebpackPlugin("build", {root:ROOT_PATH})
],
devServer: {
disableHostCheck: true,
historyApiFallback: true,
progress: true,
outputPath : BUILD_PATH,
host : "0.0.0.0",
port:3000
},
devtool: 'source-map'
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。