Skip to content

Instantly share code, notes, and snippets.

@juanbzpy
Last active July 3, 2017 02:54
Show Gist options
  • Save juanbzpy/b48c31f7e6770a257774c512dc6435d2 to your computer and use it in GitHub Desktop.
Save juanbzpy/b48c31f7e6770a257774c512dc6435d2 to your computer and use it in GitHub Desktop.
npm installs for laravel-mix
npm init
npm i laravel-mix cross-env node-sass -D
npm i react react-dom -S
  • Create webpack.mix.js
  • Paste scripts in package.js
php -S 127.0.0.1:3000 -t public
run dev watch
const mix = require('laravel-mix').mix;
mix.sass(
'./src/scss/app.scss',
'./public/css/style.css',
);
mix.react(
'./src/js/App.js',
'./public/js/bundle.js'
);
mix.browserSync({
proxy: {
target: 'localhost:8000'
},
logLevel: 'debug'
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment