这个是意思没找到index.js或者template.html的意思吗?
来源:3-1 一点小准备-单独讲解vue核心内容的配置

huaichaoer
2018-11-05
package.json文件中的内容是直接拷贝老师的
其他的也是按老师的写的 不知道为啥会这样(没有报错)
2回答
-
huaichaoer
提问者
2018-11-06
const path = require('path')
const HTMLPlugin = require('html-webpack-plugin')
const webpack = require('webpack')
const merge = require('webpack-merge')
const baseConfig = require('./webpack.config.base')
const defaultPluins = [
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: '"development"'
}
}),
new HTMLPlugin({
template: path.join(__dirname, 'template.html')
})
]
const devServer = {
port: 8080,
host: '0.0.0.0',
overlay: {
errors: true
},
hot: true
}
let config
config = merge(baseConfig, {
entry: path.join(__dirname, '../practice/index.js'),
devtool: '#cheap-module-eval-source-map',
module: {
rules: [
{
test: /\.styl/,
use: [
'vue-style-loader',
'css-loader',
{
loader: 'postcss-loader',
options: {
sourceMap: true
}
},
'stylus-loader'
]
}
]
},
devServer,
// import Vue from 'vue'
resolve: {
alias: {
'vue': path.join(__dirname, '../node_modules/vue/dist/vue.esm.js')
}
},
plugins: defaultPluins.concat([
new webpack.HotModuleReplacementPlugin(),
new webpack.NoEmitOnErrorsPlugin()
])
})
module.exports = config
00 -
Jokcy
2018-11-06
devServer中的historyApiFallback配置了么?把配置贴出来吧
052018-11-07
相似问题