Projekt

Obecné

Profil

Stáhnout (1.84 KB) Statistiky
| Větev: | Revize:
1
const path = require('path');
2
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
3

    
4
module.exports = [
5
{
6
    entry: {
7
        index: './public/js/index.js',
8
        polyfills: './public/js/polyfills.js',
9
    },
10
    optimization: {
11
        minimize: true
12
    },
13
    output: {
14
        filename: '[name].bundle.js',
15
        path: path.resolve(__dirname, 'public/js'),
16
        library: 'js'
17
    },
18
},
19
{
20
    plugins: [new MiniCssExtractPlugin()],
21
    entry: {
22
        style: './public/css/style.scss'
23
    },
24
    optimization: {
25
        minimize: true
26
    },
27
    output: {
28
        publicPath: '',
29
        path: path.resolve(__dirname, 'public/css')
30
    },
31
    module: {
32
        rules: [
33
            {
34
                test: /\.scss$/,
35
                use: [
36
                    { loader: 'style-loader' },
37
                    { loader: MiniCssExtractPlugin.loader },
38
                    { loader: 'css-loader' },
39
                    {
40
                        loader: 'postcss-loader',
41
                        options: {
42
                            postcssOptions: {
43
                                plugins: [
44
                                    [
45
                                        "autoprefixer"
46
                                    ],
47
                                ],
48
                            },
49
                        },
50
                    },
51
                    {
52
                        loader: 'sass-loader'
53
                    }
54
                ]
55
            },
56
            {
57
                test: /\.(png|jp(e*)g|svg)(\?v=\d+\.\d+\.\d+)?$/,
58
                use: [
59
                    {
60
                        loader: 'file-loader',
61
                        options: {
62
                            name: '[name].[ext]',
63
                            outputPath: 'img/'
64
                        }
65
                    }
66
                ]
67
            },
68
        ]
69
    }
70
}
71
]
(13-13/13)