#webpack

webpack: devserver proxy configuration

Published at March 9, 2019 ·  1 min read

Webpack’s devserver is a very helpful tool. It helps a lot by setting web server for application during development. Usually, you need to communicate with your API (backend) from the client-side via some URL. To avoid cross-site scripting and CORS configuration on your backend or web server(I hope, it’s Nginx:)), you can use a built-in proxy server in the webpack devserver. You use it you need just to update webpack config or vue....


Embedded React App on Your Site

Published at February 19, 2019 ·  2 min read

It’s great if you’re able to start development from scratch and you can implement SPA using the latest technologies. But sometimes you can only extend existing functionality. In such a case, it makes sense to embed your React app into the existing web site. The idea is pretty simple: you need to add your react-based application to the existing page. The easiest way is to add some <div id="reactApp"></div> to your page and add the script with a production build of your react application....


Using JSX outside React application

Published at February 3, 2019 ·  1 min read

I’m not a fan of the React at all. I prefer to use VueJS wherever it’s possible. But React is really one of the most popular JavaScript libraries now. There are a lot of people who use it and like it. One of the most important parts of React is JSX - “a syntax extension to JavaScript. It is similar to a template language, but it has full power of JavaScript”....


Vue.js, global variables and TypeScript

Published at January 15, 2019 ·  2 min read

It’s pretty easy to pass some environment variable to Vue.js application using webpack.DefinePlugin. You just need to have something like a sample below in your webpack.config.js: var webpack = require('webpack') module.exports = { // ... plugins: [ // ... new webpack.DefinePlugin({ 'BUILD': JSON.stringify(0.0.1') }) ] } It’s a common way to pass some environment variable into your JavaScript application. Technically, webpack.DefinePlugin injects a global variable into your JavaScript application. You may need it for some feature flags or some global configuration....


Easy SVG image manipulations

Published at January 13, 2019 ·  1 min read

If you decided to use SVG images as icons in your UI it becomes extremely important to have these images with different colors. E.g. you need resource status icons for ‘available’ and ‘not available’ states. You can use the same SVG for both of these states but fill it with red or green color depending on the state. It’s one of the possible use cases which could be covered by svg-transform-loader library....


Tags

.net .net-framework .net-framework-3.5 agile ajax ajax-control-toolkit ampq ansible apache asp.net asp.net-mvc automation axum babel bash benchmark blog blog-engine bootstrap buildout c# cache centos chrome ci cinder ckan cli cloud code-review codeplex community config debugger deface dependencies development-environment devices devstack devtime disks django dlr dns docker dockerimage dos easy_install elmah encoding environment-variables error event events everything-as-a-code exception exceptions fabrik firefox flask foreach forms fstab gae gcc gerrit git github go google google-app-engine grep hack hacked hardware headless horizon hound html hugo iaas ienumerable iis internet iptables iron-python ironic iscsi java-script javascript jenkins jquery js jsx k8s kharkivpy kiss kombu kubernetes kvm kyiv lettuce libvirt linux lio loci logging loopback losetup lvm mac-os macos mercurial microsoft microsoft-sync-framework mobile mono ms-office msbuild networking news nginx npm npx offtopic oop open-source open-xml opensource openstack openvswitch os packages paraller-development patterns-practices performance php pika pip plugins pnp podcast popup postgresql profiler project protocols proxy pycamp pycharm pycon pykyiv pylint pypi python python-3 qcow quantum qumy rabbitmq rar react reactjs refactoring rfc rhel search-engine security selenium server shell silverlight socket software-engineering source-control sourcegear-vault sources sql sql-server sql-server-express sqlalchemy ssh static-site sublimetext svg tests tgt tipfy todo tornado typescript uapycon ui uneta unit-tests upgrades usability vim virtualenv visual-studio vitrage vm vue.js vuejs web-development web-server web-service web_root webpack webroot windows windows-live word-press x32 x64 xcode xml xss xvfb интернет-магазин книги

Recent posts

Go 1.18: new features

Всё будет Kubernetes

2022 Relaunch

Everyday Blogging

I don't want this CI


Archives

2022 (3)
2019 (73)
2018 (2)
2017 (3)
2016 (2)
2015 (3)
2014 (5)
2013 (17)
2012 (22)
2011 (36)
2010 (25)
2009 (35)
2008 (32)
2007 (2)