修改vue中的掛載頁面(index.html)的路徑
版權聲明:本文為博主原創文章,未經博主允許不得轉載。 https://blog.csdn.net/VegasLemon/article/details/88910013
vue中的掛載頁面index.html路徑是在webpack.dev.conf.js下配置的,
找到plugins下面的
-
new HtmlWebpackPlugin({
-
filename: 'index.html',
-
template: 'index.html',
-
inject: true
-
}),
以上便是掛載頁面的配置,其中
filename是輸出的文件名,默認是index.html
template是依賴的模板,修改這個就能改變掛載的模板路徑
例如
-
new HtmlWebpackPlugin({
-
filename: 'index.html',
-
template: 'src/index.html',
-
inject: true
-
}),
以上配置將啟用src下的index.html路徑。
