autoRequire doesn't work with 2.10.15
AlexandreBourdeaudhui opened this issue · 6 comments
AlexandreBourdeaudhui commented
Actual behavior
With the release 2.10.15, my React App doesn't run. I have a white screen and my JS is still not loading. If i'm adding <script>require('src/index');</script>
on my index.HTML, it's okay.
Before the new release, i don't have problem with that config
Environment
- Brunch: 2.10.15
- Node.js: v9.4.0
- NPM: v5.6.0
- Operating system: Linux / OSX
- Code editor: Atom
package.json
contents
brunch config contents
/*
* Plugins options
*/
plugins: {
uglify: {
compress: {
drop_console: true,
drop_debugger: true,
},
},
autoReload: {
enabled: true,
},
},
/*
* Builds
*/
files: {
stylesheets: {
joinTo: 'css/app.css',
order: {
before: 'app/styles/reset.styl',
},
},
javascripts: {
joinTo: 'js/app.js',
},
},
paths: {
watched: ['app'],
packageConfig: 'node_modules/config-oclock-front/package.json',
},
modules: {
autoRequire: {
'js/app.js': ['src/index'],
},
},
};
Fire-Dragon-DoL commented
I can confirm, lost quite some time on it. The compiled file doesn't contain the "requires" at the end.
As a note, the problem starts since version 2.10.13.
paulmillr commented
I've added this to the end of a default skeleton:
exports.modules = {
autoRequire: {'app.js': ['test/initialize']}
}
Seems to be working just fine. Can you provide a repository with the issue?
AlexandreBourdeaudhui commented
Hello 👋
Sure ! You can find the repository with the issue, here
paulmillr commented
2.10.16 is out
AlexandreBourdeaudhui commented
Nice, thanks you @paulmillr ! 👌