X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=webpack.mix.js;h=60085abec5e04a85b5ad1d4f000ae5ebf7e0f388;hb=7414634d59c94fc5fa2cf9c080324e6c901fa1c9;hp=2a22dc1206aefa36f8f32a6839219094d7acd0c1;hpb=4bf2dd1dd1f6d31b2ebe299b7495a8b0e259ec77;p=alttp.git diff --git a/webpack.mix.js b/webpack.mix.js index 2a22dc1..60085ab 100644 --- a/webpack.mix.js +++ b/webpack.mix.js @@ -6,12 +6,79 @@ const mix = require('laravel-mix'); |-------------------------------------------------------------------------- | | Mix provides a clean, fluent API for defining some Webpack build steps - | for your Laravel applications. By default, we are compiling the CSS + | 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.js('resources/js/app.js', 'public/js') - .postCss('resources/css/app.css', 'public/css', [ - // - ]); +mix.js('resources/js/index.js', 'public/js') + .react() + .sass('resources/sass/app.scss', 'public/css') + .extract([ + '@babel/runtime', + '@fortawesome/fontawesome-free', + '@fortawesome/fontawesome-svg-core', + '@fortawesome/free-brands-svg-icons', + '@fortawesome/free-solid-svg-icons', + '@fortawesome/react-fontawesome', + '@popperjs/core', + '@restart/hooks', + '@restart/ui', + 'axios', + 'bootstrap', + 'call-bind', + 'classnames', + 'formik', + 'history', + 'i18next', + 'i18next-browser-languagedetector', + 'invariant', + 'laravel-echo', + 'lodash', + 'lodash-es', + 'moment', + 'numeral', + 'property-expr', + 'pusher-js', + 'qs', + 'react', + 'react-bootstrap', + 'react-dom', + 'react-fast-compare', + 'react-i18next', + 'react-is', + 'react-lifecycles-compat', + 'react-resize-detector', + 'react-router', + 'react-router-bootstrap', + 'react-router-dom', + 'react-smooth', + 'react-transition-group', + 'reduce-css-calc', + 'regenerator-runtime', + 'resize-observer-polyfill', + 'scheduler', + 'side-channel', + 'tiny-warning', + 'toastr', + 'toposort', + 'uncontrollable', + 'void-elements', + 'warning', + 'yup', + ]) + .sourceMaps(true) + .version(); +//if (mix.inProduction()) { + mix.webpackConfig({ + output: { + chunkFilename: 'js/chunks/[name].[chunkhash].js', + }, + }); +//} else { +// mix.webpackConfig({ +// output: { +// asyncChunks: false, +// }, +// }); +//}