标签:build ati web code ken filename vue 默认 解决
module.exports = {
entry: ‘./src/main.js‘,
output: {
path: path.resolve(__dirname, ‘./dist‘),
publicPath: ‘/dist/‘,
filename: ‘build.js‘
},
module: {
rules: [ ]
},
resolve: {
extensions: [".js", ".json"] //自动解决某些扩展
alias: {
‘vue$‘: ‘vue/dist/vue.esm.js‘,
‘components$‘: path.resolve(__dirname, ‘src/components/‘)
}
}
}
import Header from ‘components/Header.js‘
这样我们引用一个指定文件时就不用再向以前那样写很长的路径了
自动解决某些扩展。默认为:
extensions: [".js", ".json"]
导入时可以让用户离开扩展程序:
import Header from ‘components/Header‘
标签:build ati web code ken filename vue 默认 解决
原文地址:http://www.cnblogs.com/wusheng2016/p/7447430.html