Last active
December 9, 2017 20:44
-
-
Save kdichev/c3c1cb4fd0f7a4512557689588c986e7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let mix = require('laravel-mix'); | |
var Visualizer = require('webpack-visualizer-plugin'); | |
const ExtractTextPlugin = require("extract-text-webpack-plugin"); | |
/* | |
|-------------------------------------------------------------------------- | |
| Mix Asset Management | |
|-------------------------------------------------------------------------- | |
| | |
| Mix provides a clean, fluent API for defining some Webpack build steps | |
| for your Laravel application. By default, we are compiling the Sass | |
| file for the application as well as bundling up all the JS files. | |
| | |
*/ | |
mix | |
.options({ | |
processCssUrls: false | |
}) | |
.react('resources/assets/js/app.js', 'public/js') | |
.extract(['react', 'react-dom', 'moment', 'react-dates']) | |
.sass('resources/assets/sass/app.scss', 'public/css') | |
.copy('resources/assets/img', 'public/img', false) | |
.copy('resources/assets/fonts', 'public/fonts', false) | |
.sourceMaps() | |
.webpackConfig(webpack => { | |
return { | |
// module: { | |
// rules: [ | |
// { | |
// test: /\.css$/, | |
// use: ExtractTextPlugin.extract({ | |
// fallback: "style-loader", | |
// use: "style-loader!css-loader?importLoaders=1!sass-loader" | |
// }) | |
// } | |
// ] | |
// }, | |
plugins: [ | |
new Visualizer({filename: './statistics.html'}), | |
//new ExtractTextPlugin("./css/styles.css") | |
] | |
}; | |
}) | |
.version(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment