2016-03-05 11 views
5

का 'विभाजन' मेरा एल्म कोड (https://github.com/puruzio/seat_saver) एल्म रिएक्टर में ठीक काम करता है, और एल्म-मेक के साथ अच्छी तरह से संकलित करता है, लेकिन जब मैं इसे ब्रंच के माध्यम से संकलित करता हूं, तो मुझे निम्न त्रुटि मिलती है। यह मुझे त्रुटि को ठीक करने के लिए बहुत सुराग नहीं देता है।एल्म-ब्रंच संकलन समस्या: अपरिभाषित

My-MacBook-Pro:seat_saver_old puruzio$ brunch build 
Elm compile: Main.elm, in web/elm, to ../static/vendor/main.js 
[BABEL] Note: The code generator has deoptimised the styling of "web/elm/app.js" as it exceeds the max of "100KB". 
[BABEL] Note: The code generator has deoptimised the styling of "web/elm/elm.js" as it exceeds the max of "100KB". 
05 Mar 16:16:51 - info: compiling 
05 Mar 16:16:54 - error: [TypeError: Cannot read property 'split' of undefined] 

मेरे परियोजना उदाहरण यहाँ http://www.cultivatehq.com/posts/phoenix-elm-10/ पाया पर आधारित है जो मैं अलग फ़ाइलों में कई मॉड्यूल जोड़ने का प्रयास कर रहा हूँ करने के लिए।

ब्रंच-config.js

exports.config = { 
    // See http://brunch.io/#documentation for docs. 
    files: { 
    javascripts: { 
     joinTo: "js/app.js" 
    }, 
    stylesheets: { 
     joinTo: "css/app.css" 
    }, 
    templates: { 
     joinTo: "js/app.js" 
    } 
    }, 

    conventions: { 
    assets: /^(web\/static\/assets)/ 
    }, 

    // Phoenix paths configuration 
    paths: { 
    // Dependencies and current project directories to watch 
    watched: [ 
     "deps/phoenix/web/static", 
     "deps/phoenix_html/web/static", 
     "web/static", 
     "test/static", 
     "web/elm" 
    ], 

    // Where to compile files to 
    public: "priv/static" 
    }, 

// Configure your plugins 
plugins: { 
babel: { 
    // Do not use ES6 compiler in vendor code 
    ignore: [/web\/static\/vendor/] 
}, 
elmBrunch: {   //<<<<<<<< Here is the elmBrunch configuration 
    elmFolder: 'web/elm', 
    mainModules: ['Main.elm'], 
    outputFolder: '../static/vendor' 
} 
} , 

modules: { 
    autoRequire: { 
    "js/app.js": ["web/static/js/app"] 
    } 
}, 

npm: { 
    enabled: true 
} 
}; 

उत्तर

1

आप प्लगइन्स में निम्नलिखित में जोड़ सकते हैं - अपने ब्रंच-config.js में कोलाहल अनुभाग

compact: false 

अर्थात

plugins: { 


babel: { 
    // Do not use ES6 compiler in vendor code 
    ignore: [/web\/static\/vendor/], 
    compact: false 
}, 
elmBrunch: {   //<<<<<<<< Here is the elmBrunch configuration 
    ... 
} 
} 
संबंधित मुद्दे