__dirname 表示当前路径的绝对路径
const path = require('path');
module.exports = {//输出配置项entry: './src/main.js',//入口output: {//输出publicPath: '/dist',filename: 'bundle.js',path: path.resolve(__dirname,'dist')}}path是node.js的一个路径处理模块,不仅仅有path.resolve还有path.join等处理路径的方式,path.resolve操作类似于cd操作,就是一步一步查找,而__dirname则是获得当前文件所在目录的完整路径名
浙公网安备 33010602011771号