These are chat archives for brunch/brunch

29th
Jun 2016
Matt
@matthopson
Jun 29 2016 01:00
@colinbate thanks for the response! I do. Is this a change since earlier versions (needing to specify a node_modules destination)? Since these are dev dependencies, I would think they would be handled already. Wasn't something that was necessary in 1.8.5 so just looking for clarification.
Colin Bate
@colinbate
Jun 29 2016 02:47
Brunch 2+ can do npm application dependencies so I thought that might be what you are doing. And support is enabled by default. So if you don't need npm support for your app then you can add
'npm: {enabled: false}' to your config. See http://brunch.io/docs/config#-npm-
I think the npm support adds some shims by default which might be causing the issues you are seeing.
Matt
@matthopson
Jun 29 2016 13:36
Heyo! That did it.... at first I was confused why a brunch dep would even be throwing these warnings, but now it makes sense. Since it's enabled by default, yet I haven't declared any packages to include, it isn't actually being referenced (assuming as a wrapper?). Therefore "compiled, but not written..."
Colin Bate
@colinbate
Jun 29 2016 16:14
I think a couple of the core modules like process are "referenced" by default but if you didn't have anywhere configured to write them out then it would give that warning. Best to disable if you aren't using npm modules.
Matt
@matthopson
Jun 29 2016 16:27
Yup, makes sense.
Funny enough, I also ran into one other issue, where the modules are being built with the file extensions... A quick search through issues, and I found you had brought up this topic!
Not only that but a former coworker was in that discussion as well... small world we kick around in.
Colin Bate
@colinbate
Jun 29 2016 16:51
It is. Did the issue resolve your problem?
Matt
@matthopson
Jun 29 2016 17:00
Not entirely. I don't suppose there is a flag for reverting this functionality? I didn't see anything obvious. It looks like I can probably achieve the old result by way of module config
Or update my app..
Since I'm working on upgrading deps in our build process, I'd like to keep refactors in the app to a minimum for migration purposes.
Colin Bate
@colinbate
Jun 29 2016 17:02
they are generated using the extension, but unless you have multiple files in the same folder with the same name and different extensions, you should be able to import them without the extensions
they are aliased
Matt
@matthopson
Jun 29 2016 17:52
Yeah, the app is depending on require.list() - but it's not that big of an issue to strip those out app-side - as I'm already touching those module names anyway. Thanks again for all your help! You've kept me sane!
Colin Bate
@colinbate
Jun 29 2016 17:58
How meta... good luck with that and not a problem
Jackson Ray Hamilton
@jacksonrayhamilton
Jun 29 2016 22:55
Hi, is there any plugin that would allow me to require() arbitrary text files (similar to Require.js text plugin?) For instance, I'd like to do var icon = require('./icons/arrow.svg'); and inject that SVG string into my HTML somewhere.
I see that there is an "svg-brunch" package, but I'd like to be able to require any type of text file using the same plugin.