Skip to content
Advertisement

Tag: webpack

Ignore return outside of function with babel 7

I recently updated to babel 7 and webpack 4 and am receiving this error when running our gulp build task: This is caused by the return outside of a function in browser-syncs dev-ip dependency. Is there a way to configure my .babelrc file to ignore this? I’ve tried the following: Installing only production dependencies, but because browser sync is imported

Unable to require() a variable path from props in VueJS

I am sending data – a URL to a local image file, from parent to child, and when I load it in child component’s it shows an error, but if I directly load it, it works. Code: In parent.vue component’s data: In child.vue component’s mounted() And console.log(this.item.src) gives exactly the same string, so the child is actually getting the data

Control webpack verbosity when programmatically starting vue-cli-service serve

I’m trying to run vue-cli-service serve from inside a Node.js application like this: And it works. But when I do it in production mode (change service.init(“development”) to service.init(“production”)), I don’t see the webpack “building” progress anymore. Hence my question: how to start a Vue server in production mode, but keep webpack progress printed to the console? Answer Progress is reported

plugin is not working in Webpack with React JS

I am creating a React JS app. I have installed terser-webpack-plugin to both try to compress my code as well as remove console.log() statements. However, it does not seem to be working. I have installed the terser-webpack-plugin as follows: My webpack.config.js file looks like this: However, when I run npm run build or npm run dev it does not seem

Webpack dev server and WebSockets

Three quick questions: 1) Knowing full well the benefits of Socket.io, I still wanna know if it is possible to run a single webpack-dev-server that can server both http and ws. Everything online is oriented to using Socket.io and running dual servers for http / ws. 2) If indeed I must use Socket.io, how does local development (http server and

Advertisement