Webpack 设置ES6环境网页包
我正在尝试创建一个es6环境 在我的es6文件夹中,我有以下内容Webpack 设置ES6环境网页包,webpack,Webpack,我正在尝试创建一个es6环境 在我的es6文件夹中,我有以下内容 ES6 = ROOT FOLDERR App <--(folder name) Files within the folder. index.js Build <--(folder name) Files within folder. Index.html node_modules <--(folder name) I also have a package.json within my main root
ES6 = ROOT FOLDERR
App <--(folder name) Files within the folder. index.js
Build <--(folder name) Files within folder. Index.html
node_modules <--(folder name)
I also have a package.json within my main root folder and a webpack.config.js
when I ran an npm run build on my terminal to see if everything was working I got this message.
ES6=根文件夹
App您是否尝试将_udirname添加到输出路径
module.exports = {
entry: ['./app/index.js'],
output: {
path: __dirname + './build',
filename: 'bundle.js'
}
}
您是否尝试将_dirname添加到输出路径
module.exports = {
entry: ['./app/index.js'],
output: {
path: __dirname + './build',
filename: 'bundle.js'
}
}
我们可以看看你的package.json吗?您是否已使用npm install webpack-g在全球范围内安装了webpack
?是的,我这里有我的package.json{“name”:“es6”,“version”:“1.0.0”,“main”:“index.js”,“dependencies”:{“webpack”:“^2.5.1”},“devdependenciencies”:{“webpack”:“^2.5.1”},“脚本”:“{“build”:“webpack”},“关键字”[],“author”:“”“license”:“ISC”,“description”:“”}请参阅。以下npm命令和它下面的命令是否通过终端无效配置对象发送了相同的消息。已使用与API架构不匹配的配置对象初始化Web包。-configuration.output.path:提供的值“/build”不是绝对路径!我们可以看看配置吗?我们可以看看你的package.json吗?您是否已使用npm install webpack-g在全球范围内安装了webpack
?是的,我这里有我的package.json{“name”:“es6”,“version”:“1.0.0”,“main”:“index.js”,“dependencies”:{“webpack”:“^2.5.1”},“devdependenciencies”:{“webpack”:“^2.5.1”},“脚本”:“{“build”:“webpack”},“关键字”[],“author”:“”“license”:“ISC”,“description”:“”}请参阅。以下npm命令和它下面的命令是否通过终端无效配置对象发送了相同的消息。已使用与API架构不匹配的配置对象初始化Web包。-configuration.output.path:提供的值“/build”不是绝对路径!我们能看看配置吗?