-1
這裏是我的WebPack 2的配置:的WebPack 2意外的標記進口
const path = require('path')
const webpack = require('webpack');
module.exports = {
entry: "./js/app.js",
output: {
path: path.resolve(__dirname, "dist"),
publicPath: "/dist/",
filename: "bundle.js"
},
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
use: [{
loader: 'babel-loader',
options: {
presets: ['es2015']
}
}]
},
],
},
devServer: {
headers: { "Access-Control-Allow-Origin": "http://localhost:8000", "Access-Control-Allow-Credentials": "true" }
}
};
有什麼毛病我的WebPack配置? 我的輸出包不會傳輸到ES2015中。
請發佈完整的錯誤 – loganfsmyth