You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
vuejs_spa/build/webpack.base.config.js

38 lines
998 B
JavaScript

const path = require('path')
const config = {
entry: {
app: path.resolve(__dirname, '../src/client-entry.js')
},
//Path for output files
output:{
path: path.resolve(__dirname, '../dist'), //where we eventually deploy. Notice it's relative to this file location
publicPath: '/', //dist folder availble through our site through the root path
filename: 'assets/js/[name].js' //
},
//We do not want to use this in production because it
//instead we whatnt o make sure that all components are defined in *.vuejs
//files, because they are pre-compiled
resolve: { // What the hell does resolve do?
alias:{
vue: 'vue/dist/vue.js'
}
},
module: {
rules: [
{
enforce: 'pre', //check source files before they are loader by other loaders
test: /(\.js$)/,
loader: 'eslint-loader',
exclude: /node_modules/
}
]
}
}
module.exports = config