Closed bigardone closed 6 years ago
I have the same issue, specially when running 'brunch build --production'.
@bigardone @shamanime Yes, I have the same problem too. Reverting to v0.7.0 solves the issue as I believe it was introduced by https://github.com/madsflensted/elm-brunch/pull/30.
Other than #33 nothing else has been changed since then apart from updates to the README.
Perhaps a solution would be to have an option to determine when the compilation is done - in the 0.7.0 way or 0.8.0 way.
For now, I will just use 0.7.0.
I had the same problem. Downgrading to 0.7.0 fixed it for me. Thanks you!
It's been a while, any update on this?
If anybody can create PR where the build order is configurable then I will be happy to merge and publish.
I'm not really sure if the way that #30 changes the elm compilation to happen with the compile
method to the onCompile
hook is the right approach. Furthermore, I don't think having some switch to change between using compile
or onCompile
is appropriate as there should just be one way that works in all scenarios.
I cannot reproduce the problem that #30 tries to fix (which was related to the Brunch cache problems) - perhaps it is fixed in a different way by a later version of Brunch itself.
@stelmakh could you provide steps to reproduce the original problem in #30?
had a problem where elm.js wasn't compiled at all and there was no warning. Fell on this issue by chance and I'm super glad that reverting to 0.7 fixed it. thanks!
@madsflensted In the absence of any reply from @stelmakh in how to reproduce the original problem that PR #30 tried to fix, and also that, as far as I can see, #30 introduced bug #38, can we just revert #30 ?
Otherwise we will be stuck with having to use v0.7.0 forever.
I will try to have a look at it.
On Oct 30, 2017 00:13, "chazsconi" notifications@github.com wrote:
@madsflenstedin the absence of any reply from @stelmakh https://github.com/stelmakh in how to reproduce the original problem that PR #30 https://github.com/madsflensted/elm-brunch/pull/30 tried to fix, and also that, as far as I can see, #30 https://github.com/madsflensted/elm-brunch/pull/30 introduced bug #38 https://github.com/madsflensted/elm-brunch/issues/38, can we just revert #30 https://github.com/madsflensted/elm-brunch/pull/30 ?
Otherwise we will be stuck with having to use v0.7.0 forever.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/madsflensted/elm-brunch/issues/35#issuecomment-340273890, or mute the thread https://github.com/notifications/unsubscribe-auth/AJ8r4pp-H_Fj7xyAFXVI1VpUJebVY-vOks5sxKQ2gaJpZM4MjfJM .
Reverted PR 30, it is published as 0.10.0. Can you check if this resolves this issue?
I had a problem with elm not compiling at all, and it's fixed with version 0.10.0, thanks a lot!
Fixed for me also in 0.10.0 Thanks @madsflensted
Problem
Hi! I'm experimenting an issue in a project, where I'm using
elm-brunch
along withbabel-brunch
. The issue is thatelm-babel
seems to be building first, and one of the js files is importing themain.js
created byelm-brunch
, which doesn't exist yet, so the build breaks due to not finding that file. I've tried arranging the npm modules to solve the build order issue, as specified in here https://github.com/brunch/brunch/issues/1377#issuecomment-287840153, but it doesn't solve the problem. What can I do?Information
[ ] elm-brunch version elm-brunch@0.8.0
[ ] brunch version brunch@2.10.9
[ ] nodejs version v7.7.3
[ ] content of brunch-config.js exports.config = { // See http://brunch.io/#documentation for docs. files: { javascripts: { joinTo: { 'js/app.min.js': /^(web\/static\/js|renderer)/, 'js/vendor.min.js': /^(node_modules|elm)/, },
// To use a separate vendor.js bundle, specify two files path // http://brunch.io/docs/config#-files- // joinTo: { // "js/app.js": /^(web\/static\/js)/, // "js/vendor.js": /^(web\/static\/vendor)|(deps)/ // } // // To change the order of concatenation of files, explicitly mention here // order: { // before: [ // "web/static/vendor/js/jquery-2.1.1.js", // "web/static/vendor/js/bootstrap.min.js" // ] // } }, stylesheets: { joinTo: 'css/app.css', order: { after: ['web/static/css/app.scss'], // concat app.css last }, }, templates: { joinTo: 'js/app.js', }, },
conventions: { // This option sets where we should place non-css and non-js assets in. // By default, we set this to "/web/static/assets". Files in this directory // will be copied to
paths.public
, which is "priv/static" by default. assets: /^(web\/static\/assets)/, },// Phoenix paths configuration paths: { // Dependencies and current project directories to watch watched: [ 'elm', 'renderer/client', 'renderer/common', 'web/static', 'test/static', ],
// Where to compile files to public: 'priv/static', },
// Configure your plugins plugins: { elmBrunch: { elmFolder: 'elm', mainModules: ['src/Main.elm'], outputFolder: '../web/static/js', makeParameters: ['--debug'], }, babel: { presets: ['es2015', 'react', 'stage-0'], plugins: ['transform-runtime'], // Do not use ES6 compiler in vendor code ignore: [/web\/static\/vendor/], }, sass: { options: { includePaths: ['node_modules'], }, }, },
modules: { autoRequire: { 'js/app.min.js': ['web/static/js/app'], }, },
npm: { enabled: true, }, };
[ ] content of elm-package.json { "version": "1.0.0", "summary": "helpful summary of your project, less than 80 characters", "repository": "https://github.com/user/project.git", "license": "BSD3", "source-directories": [ "./src", "./vendor" ], "exposed-modules": [], "dependencies": { "NoRedInk/elm-decode-pipeline": "3.0.0 <= v < 4.0.0", "elm-community/list-extra": "6.0.0 <= v < 7.0.0", "elm-lang/core": "5.1.1 <= v < 6.0.0", "elm-lang/html": "2.0.0 <= v < 3.0.0", "elm-lang/websocket": "1.0.2 <= v < 2.0.0" }, "elm-version": "0.18.0 <= v < 0.19.0" }
[ ] file layout for your elm files relative to root of project.
[ ] Operating System OSX El Capitan