如何在Web框架视图中使用Webpack注入js / css

时间:2018-12-07 12:13:55

标签: javascript vue.js flask webpack html-webpack-plugin

我想使用webpack将css / js注入我的视图中。我正在使用Vue.js以及webpack和flask作为Web服务器。前端不是SPA,而是在每个烧瓶视图中呈现在服务器端。

使用SPA时,我们只有一个入口是index.html,但在这种情况下,我有几个入口,它们都是我的flask视图,需要由webpack生成的特定js和css文件。

如何使用带有多个入口点(视图)的HTMLWebpackPlugin注入?烧瓶视图仍为let outputSet = [ { "sourcelocation": { "orderindex": "0" }, "destinationlocation": { "orderindex": "1" }, "rider_ids": "2b7116ea3dead9870b828a1v" }, { "sourcelocation": { "orderindex": "0" }, "destinationlocation": { "orderindex": "1" }, "rider_ids": "4b7116ea3dead9870b828a19" }, { "sourcelocation": { "orderindex": "0" }, "destinationlocation": { "orderindex": "3" }, "rider_ids": "548e653d56060c83838b772e" }, { "rider_ids": "2b7116ea3dead9870b828a1v", "is_dropoff": true, "address": { "orderindex": "1" } }, { "rider_ids": "4b7116ea3dead9870b828a19", "is_dropoff": true, "address": { "orderindex": "1" } }, { "sourcelocation": { "orderindex": "2" }, "destinationlocation": { "orderindex": "3" }, "rider_ids": "5b8e676d56060c83838b772e" }, { "rider_ids": "5b8e676d56060c83838b772e", "is_dropoff": true, "address": { "orderindex": "3" } }, { "rider_ids": "548e653d56060c83838b772e", "is_dropoff": true, "address": { "orderindex": "3" } } ]

谢谢!

0 个答案:

没有答案