How do entrypoints work? #1865
Replies: 5 comments
-
|
Beta Was this translation helpful? Give feedback.
-
This config might work, though I haven't tried it: exports.files = {
javascripts: {
entryPoints: {
'app/proj1/index.js': {
'proj1.js': /^app/
},
'app/proj2/index.js': {
'proj2.js': /^app/
}
},
joinTo: {
'vendor.js': /^(?!app)/
}
},
// ...
}; |
Beta Was this translation helpful? Give feedback.
-
How did you manage to get this to work anyways. I tried entryPoints a couple of times without success. |
Beta Was this translation helpful? Give feedback.
-
I'm also having issues with entrypoints, I just get this vague error
module.exports = {
files: {
javascripts: {
entryPoints: {
'js/map.js': 'map.js'
}
},
stylesheets: {
joinTo: {
'map.css': /map/,
'home.css': /home/
}
}
},
paths: {
watched: ['frontend'],
public: './static'
}
} |
Beta Was this translation helpful? Give feedback.
-
Assuming your source file is module.exports = {
files: {
javascripts: {
entryPoints: {
'frontend/map.js': 'js/map.js'
}
},
stylesheets: {
joinTo: {
'map.css': /map/,
'home.css': /home/
}
}
},
paths: {
watched: ['frontend'],
public: 'static'
}
} |
Beta Was this translation helpful? Give feedback.
-
Description
I want to make the switch to brunch but can't figure out how entryPoints are supposed to work. I already looked at the issue here #1349, but it didn't help me much.
Expected behavior
I want to get two files,
proj1.js
andproj2.js
and avendor.js
file that contains all the node_module dependencies of the two other files.Actual behavior
Console output:
Environment
package.json
contentsbrunch config contents
Other useful files, when present (log,
bower.json
etc.)Project structure:
Beta Was this translation helpful? Give feedback.
All reactions