webpack ^4.0.1 版本的webpack.config.js配置
2018-03-02 16:06
726 查看
var path = require("path"); module.exports = { entry:'./app/index.js', output:{ filename:'index.js', path:path.resolve(__dirname,'dist'), publicPath:'temp/' //公共路径,从内存中读取 }, devServer:{ contentBase:'./', host:'localhost', compress:true, port:1818 }, module:{ rules:[ { test:/\.js$/, exclude:/node_modules/, loader:'babel-loader', options:{ presets:["es2015","react"] } } ] } }以上是webpack ^4.0.1 版本的webpack.config.js文件的配置
参考官方文档 https://webpack.js.org/configuration/#options 我的目录及文件
相关文章推荐
- webpack4.0.1安装问题和webpack.config.js的配置变化
- webpack4.0.1安装问题和webpack.config.js的配置变化
- webpack.config.js配置详解
- webpack---webpack.config.js配置基本要素entry、output、loader、plugins等
- VUE开发请求本地数据的配置,旧版本dev-server.js,新版本webpack.dev.conf.js
- webpack 浅析 webpack.config.js 文件的简单配置
- 七:webpack.config.js文件的高级配置
- webpack2-webpack.config.js配置
- webpack2-webpack.config.js配置
- webpack.config.js的配置
- webpack.config.dev.js中配置less
- webpack2-webpack.config.js配置
- webpack2-webpack.config.js配置
- webpack教程之webpack.config.js配置文件
- webpack.config.js文件的高级配置
- webpack.config.js配置信息的说明
- 配置webpack.config.js
- 对vue中 默认的 config/index.js:配置的详细理解 -【以及webpack配置的理解】-config配置的目的都是为了服务webpack的配置,给不同的编译条件提供配置
- 在webpack.config.js中配置jquery
- [js高手之路]深入浅出webpack教程系列3-配置文件webpack.config.js详解(下)