在webpack.config.js
文件中,我们可以如下所示设置条目文件。
module.exports = (env = {}, argv = {}) => {
const config = {
entry: {
main: './src/js/main.js'
},
}
}
但是在vue.config.js
文件中,如何声明条目文件呢?我已经在文档登记了。但也有这样的财产。
发布于 2018-10-12 06:59:00
Vue CLI 3集成了webpack链库,作为配置webpack的另一种方式。
例如,您的配置文件可能如下所示:
chainWebpack: config => {
// clear the existing entry point
config
.entry('main')
.clear()
// add your custom entry point
config
.entry('main')
.add('./src/js/main.js')
}
请参阅关于配置entryPoints的部分。
发布于 2022-10-02 17:51:49
对于vue-cli 4,它是:
chainWebpack: (config) => {
// Clear the existing entry point
config.entry('app').clear()
// Add the custom entry point
config.entry('app').add('./src/js/main.js')
}
https://stackoverflow.com/questions/52772651
复制相似问题