vue-loader

Webpack dev server custom parameters from command line

流过昼夜 提交于 2020-08-22 08:31:56
问题 I want to pass custom parameters from command line. Something like this: webpack-dev-server --inline --hot --customparam1=value Exactly what I am trying to achieve is that I am working on a vue-loader application. The application has certain services that fetch data. I have another application that acts as the api server. We need the application to run in 2 ways (because all members of our team don't have access to the api server) So that service has 2 ways to get data: 1) If api server is

Webpack dev server custom parameters from command line

≯℡__Kan透↙ 提交于 2020-08-22 08:30:56
问题 I want to pass custom parameters from command line. Something like this: webpack-dev-server --inline --hot --customparam1=value Exactly what I am trying to achieve is that I am working on a vue-loader application. The application has certain services that fetch data. I have another application that acts as the api server. We need the application to run in 2 ways (because all members of our team don't have access to the api server) So that service has 2 ways to get data: 1) If api server is

Webpack Build Error: Can't resolve subcomponents within a PrimeVue UI component

落花浮王杯 提交于 2020-08-10 22:52:49
问题 I am unable to build certain PrimeVue UI components with webpack. I have tried several components, and all the basic ones work fine, but as soon as I try and use a component that requires a sub-component, webpack fails to build. I experienced this so far with the Breadcrumb and PanelMenu components. The error is: ERROR in ./node_modules/primevue/components/panelmenu/PanelMenu.vue?vue&type=script&lang=js& (./node_modules/vue-loader/lib??vue-loader-options!./node_modules/primevue/components

Webpack Build Error: Can't resolve subcomponents within a PrimeVue UI component

这一生的挚爱 提交于 2020-08-10 22:48:31
问题 I am unable to build certain PrimeVue UI components with webpack. I have tried several components, and all the basic ones work fine, but as soon as I try and use a component that requires a sub-component, webpack fails to build. I experienced this so far with the Breadcrumb and PanelMenu components. The error is: ERROR in ./node_modules/primevue/components/panelmenu/PanelMenu.vue?vue&type=script&lang=js& (./node_modules/vue-loader/lib??vue-loader-options!./node_modules/primevue/components

Webpack Vue component with css <style> tags fails to build with Module parse failed: Unexpected token

北慕城南 提交于 2020-07-10 07:00:09
问题 Starting with a clean vue project, I was having issues building .vue components from PrimeVue. These are ready made components and should really not fail to build. Everytime I try to build, it fails to do so, and seems to fail with the line pointer at the start of the CSS styles. ERROR in ./node_modules/primevue/components/slider/Slider.vue?vue&type=style&index=0&lang=css& (./node_modules/vue-loader/lib??vue-loader-options!./node_modules/primevue/components/slider/Slider.vue?vue&type=style

vue js watch multiple properties with single handler

[亡魂溺海] 提交于 2020-06-24 10:54:45
问题 Currently I have to watch a few properties. And if each of them changes, I have to invoke the same function: export default{ // ...... rest of code watch: { propa: function(after,before) { doSomething(after,before); }, propb: function(after,before) { doSomething(after,before); } // ... so on } } So I am having to write the same code multiple times above. Is it possible to simply have all properties being watched and invoke their change handler without having to write same code multiple times?

vue-loader: how to use vue-loader v15 in webpack 4 and vue-cli3

爷,独闯天下 提交于 2020-05-25 20:25:17
问题 I use the latest versions of vue-cli3 webpack4 and vue-loader v15. I want to configure vue-loader , but there is an error: Error: [VueLoaderPlugin Error] No matching use for vue-loader is found. Make sure the rule matching .vue files include vue-loader in its use. vue.config.js const HtmlWebpackPlugin = require("html-webpack-plugin"); const VueLoaderPlugin = require("vue-loader/lib/plugin"); module.exports = { productionSourceMap: false, baseUrl: "./", configureWebpack: { module: { rules: [{

vue-loader: how to use vue-loader v15 in webpack 4 and vue-cli3

做~自己de王妃 提交于 2020-05-25 20:24:50
问题 I use the latest versions of vue-cli3 webpack4 and vue-loader v15. I want to configure vue-loader , but there is an error: Error: [VueLoaderPlugin Error] No matching use for vue-loader is found. Make sure the rule matching .vue files include vue-loader in its use. vue.config.js const HtmlWebpackPlugin = require("html-webpack-plugin"); const VueLoaderPlugin = require("vue-loader/lib/plugin"); module.exports = { productionSourceMap: false, baseUrl: "./", configureWebpack: { module: { rules: [{

webpack part2

时光毁灭记忆、已成空白 提交于 2020-04-02 06:21:21
Vue单文件组件 webpack中配置vue组件的加载器 npm i vue-loader vue-template-compiler -D webpack.config中添加vue-loader的配置 const VueLoaderPlugin = require('vue-loader/lib/plugin') module.exports = { module: { rules: [ //...其他规则 {test:/\.vue/, loader:'vue-loader'} } ] } plugins: [new VueLoaderPlugin()] 2.Webpack项目中使用vue 3.打包发布 packge.json中配置 "build": "webpack -p" //打包指令 来源: https://www.cnblogs.com/-constructor/p/12617259.html

xc_ui_portal运行失败

◇◆丶佛笑我妖孽 提交于 2020-03-26 15:03:47
错误:No parser and no filepath given, using 'babel' the parser now but this will throw an error in t he f 原因:vue-loader的版本没跟上其他包的版本导致解析器不运行 解决办法: 找到modules包里面的:node_modules\vue-loader\lib\template-compiler\index.js 找到 if (!isProduction) { code = prettier.format(code, { semi: false}) } 替换为 if (!isProduction) { code = prettier.format(code, { semi: false, parser: 'babel' }) } 重新run ,ok 来源: https://www.cnblogs.com/hellosiyu/p/12573878.html