ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • WebPack 다중 빌드 경로 예제
    자바스크립트 2021. 8. 8. 23:00

     

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    const path = require('path')
     
    var config = {
        // TODO: Add common Configuration
        module: {},
    };
     
    var homeConfig = Object.assign({}, config, {
        name"home",
        entry: ['@babel/polyfill','./home/static/home/esnext/main.js'],
        output: {
           path: path.resolve(__dirname, 'home/static/home/js'),
           filename: "bundle.js"
        },
        devtool: 'source-map',
        mode: 'development',
    });
     
    var shipmentConfig = Object.assign({}, config, {
        name"shipment",
        entry: ['@babel/polyfill','./shipment/static/shipment/esnext/main.js'],
        output: {
           path: path.resolve(__dirname, 'shipment/static/shipment/js'),
           filename: "bundle.js"
        },
        devtool: 'source-map',
        mode: 'development',
    });
     
    // Return Array of Configurations
    module.exports = [
        homeConfig, shipmentConfig,
    ];
    cs

     

    댓글

Designed by Tistory.