Skip to content

Instantly share code, notes, and snippets.

View vio's full-sized avatar
💭
📦 🔨 🔧

Viorel Cojocaru vio

💭
📦 🔨 🔧
View GitHub Profile
{
"assets": [
{
"chunkNames": [
"vendor"
],
"chunks": [
0
],
"emitted": true,
{
"assets": [
{
"chunkNames": [
"vendor"
],
"chunks": [
0
],
"emitted": true,
@vio
vio / dynamic-imports.md
Last active October 25, 2017 06:04
Dynamic imports with Webpack 3 + Typescript 2.4 + Babel

Using import

import(/* webpackChunkName: "my-chunnk" */ 'CHUNK_PATH')
  .then((res) => console.log(res))
  .catch((err) => console.error(err));
  1. supported by TS 2.4, but module will need to output esnext (tsconfig.json)
{
"assets": [
{
"contentSize": 1440,
"cookies": 0,
"expires": 0,
"headerSize": -1,
"headers": {
"request": {
":authority": "s.codepen.io",

Since 0.45.0, stylus is not throwing errors when the top parent selector is indented.

In 0.44.0

  .element
    color: #fff

Is throwing an error:

@vio
vio / stylus-media-query-extend.styl
Last active May 16, 2021 10:53
Stylus @extend inside a media query
// Extend in a media query
// =============================================================================
// Mixins
// -----------------------------------------------------------------------------
clearfix()
&:before,
&:after
content: ' '
display: tablet
@vio
vio / stylus-extend-workarounds.md
Last active August 29, 2015 14:21
Workarounds for extending inside media queries
  1. Use @extend by default, copy inside the media queries

placeholder()
  color: red

$placeholder
  placeholder()

.element-a