]> git.localhorst.tv Git - alttp.git/blob - webpack.mix.js
universal examples
[alttp.git] / webpack.mix.js
1 const mix = require('laravel-mix');
2
3 /*
4  |--------------------------------------------------------------------------
5  | Mix Asset Management
6  |--------------------------------------------------------------------------
7  |
8  | Mix provides a clean, fluent API for defining some Webpack build steps
9  | for your Laravel application. By default, we are compiling the Sass
10  | file for the application as well as bundling up all the JS files.
11  |
12  */
13
14 mix.js('resources/js/index.js', 'public/js')
15         .react()
16         .sass('resources/sass/app.scss', 'public/css')
17         .extract([
18                 '@babel/runtime',
19                 '@fortawesome/fontawesome-free',
20                 '@fortawesome/fontawesome-svg-core',
21                 '@fortawesome/free-brands-svg-icons',
22                 '@fortawesome/free-solid-svg-icons',
23                 '@fortawesome/react-fontawesome',
24                 '@popperjs/core',
25                 '@restart/hooks',
26                 '@restart/ui',
27                 'axios',
28                 'bootstrap',
29                 'call-bind',
30                 'classnames',
31                 'formik',
32                 'history',
33                 'i18next',
34                 'i18next-browser-languagedetector',
35                 'invariant',
36                 'laravel-echo',
37                 'lodash',
38                 'lodash-es',
39                 'moment',
40                 'numeral',
41                 'property-expr',
42                 'pusher-js',
43                 'qs',
44                 'react',
45                 'react-bootstrap',
46                 'react-dom',
47                 'react-fast-compare',
48                 'react-i18next',
49                 'react-is',
50                 'react-lifecycles-compat',
51                 'react-resize-detector',
52                 'react-router',
53                 'react-router-bootstrap',
54                 'react-router-dom',
55                 'react-smooth',
56                 'react-transition-group',
57                 'reduce-css-calc',
58                 'regenerator-runtime',
59                 'resize-observer-polyfill',
60                 'scheduler',
61                 'side-channel',
62                 'tiny-warning',
63                 'toastr',
64                 'toposort',
65                 'uncontrollable',
66                 'void-elements',
67                 'warning',
68                 'yup',
69         ])
70         .sourceMaps(true)
71         .version();
72 //if (mix.inProduction()) {
73         mix.webpackConfig({
74                 output: {
75                         chunkFilename: 'js/chunks/[name].[chunkhash].js',
76                 },
77         });
78 //} else {
79 //      mix.webpackConfig({
80 //              output: {
81 //                      asyncChunks: false,
82 //              },
83 //      });
84 //}