Help us understand the problem. What is going on with this article?

LaravelElixir使ったらSassをコンパイルしてベンダープレフィックス対応するのが簡単過ぎてもう笑うしかなかった

More than 3 years have passed since last update.

以前書いた記事LaravelElixir使ったらTypescriptをBrowserifyするのが簡単過ぎてもう笑うしかなかったのSass編。

Sassのコンパイルを追加してみる

gulpfile.jsに追加するのはたったこれだけ。えっ
なんと内部でえっautoprefixer()してくれていた。えっ

autoprefixerとは。

.sass('app.sass')

追加後

var elixir = require('laravel-elixir');

// デフォルトが`resources/assets/js`なため`ts`に変更
elixir.config.js.folder = 'ts'
// pluginにtsifyを指定
elixir.config.js.browserify.plugins = [ { name: 'tsify' } ]
// 実行
elixir(function (mix) {
    mix.browserify('app.ts')
       // .sass()を追加
       .sass('app.sass')
       .version(['js/app.js'])
})

あとはこの続きと一緒

ちゃんとprefixもついてた。この瞬間私は笑うしかなくなった。

.flex-rowdiv, .box-birthday {
  display: -ms-flexbox;
  display: flex;
  -ms-flex-direction: row;
  flex-direction: row; }

だがしかしnode_modulesの量がものすっごい。
こんな感じでモジュール化されるとより嬉しい。

laravel-elixir
 ├─laravel-elixir-ts
 ├─laravel-elixir-sass
 │
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away