Skip to content
This repository has been archived by the owner on Feb 24, 2024. It is now read-only.

Commit

Permalink
Merge branch 'development' of https://github.com/gobuffalo/buffalo in…
Browse files Browse the repository at this point in the history
…to development
  • Loading branch information
markbates committed Jun 22, 2018
2 parents a267c46 + a15bbc6 commit 8e16ff3
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions generators/assets/webpack/templates/webpack.config.js.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,22 @@ const configurator = {
'./assets/css/application.scss',
],
}

Glob.sync("./assets/*/*.*").forEach((entry) => {
if (entry === './assets/css/application.scss') {
return
}

let key = entry.replace(/(\.\/assets\/(js|css|go)\/)|\.(js|s[ac]ss|go)/g, '')
if(key.startsWith("_") || (/(js|s[ac]ss|go)$/i).test(entry) == false) {
return
}

if( entries[key] == null) {
entries[key] = [entry]
return
}
}

entries[key].push(entry)
})

Expand Down Expand Up @@ -73,7 +73,7 @@ const configurator = {

buildConfig: function(){
const env = process.env.NODE_ENV || "development";

var config = {
mode: env,
entry: configurator.entries(),
Expand Down Expand Up @@ -104,4 +104,4 @@ const configurator = {
}
}

module.exports = configurator.buildConfig()
module.exports = configurator.buildConfig()

0 comments on commit 8e16ff3

Please sign in to comment.