Skip to content

Instantly share code, notes, and snippets.

@j0lv3r4
Last active July 3, 2017 02:54
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save j0lv3r4/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