]> git.localhorst.tv Git - alttp.git/blobdiff - webpack.mix.js
pendant auto tracking
[alttp.git] / webpack.mix.js
index da460c6fe9733bf155917221afb4d3682efefb8a..60085abec5e04a85b5ad1d4f000ae5ebf7e0f388 100644 (file)
@@ -11,8 +11,74 @@ const mix = require('laravel-mix');
  |
  */
 
-mix.js('resources/js/app.js', 'public/js')
-    .react()
-    .sass('resources/sass/app.scss', '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,
+//             },
+//     });
+//}