JS files don't build in development mode
See original GitHub issueI may be missing something here but I’m trying to get my JS to bundle on the yarn run blendid
command. It builds fine when I run yarn run blendid -- build
. I’m assuming this has something to do with the HMR, but b/c I’m using VM and browswersync in proxy mode I’m ok with the JS file reloading. It just does nothing currently.
Below is my task-config.js
module.exports = {
html : false,
images : true,
fonts : true,
static : true,
svgSprite : true,
ghPages : false,
stylesheets : true,
javascripts: {
entry: {
// files paths are relative to
// javascripts.dest in path-config.json
app: ["./app.js"]
},
publicPath: './public/javascripts'
},
browserSync: {
proxy: 'outside.dev',
files: ['./public/**/*'],
watchOptions: {
poll: true,
aggregateTimeout: 300
}
},
watch: {
gulpWatch: {
usePolling: true,
interval: 1000,
binaryInterval: 2500
}
},
production: {
rev: false
}
}
Issue Analytics
- State:
- Created 6 years ago
- Reactions:6
- Comments:9 (2 by maintainers)
Top Results From Across the Web
Webpack / How to not bundle JS files in dev mode?
In dev mode, I would like to have access to each JS separately. I don't want them to be bundled in one file....
Read more >How Does the Development Mode Work? - Overreacted
Let's take a look. The exact way to run different code in development depends on your JavaScript build pipeline (and whether you have...
Read more >calling JS files in /static folder by script tag don't get fired on ...
Description. Calling a JS file with e.g. <script src="/static/folder/file.js" /> on gatsby develop doesn't call the file.
Read more >Enabling and Disabling Angular Production Mode - Pluralsight
In this guide, we are going to learn about production mode. If you haven't heard this term before, don't worry—I'll walk you through...
Read more >rollup.js
You can provide an optional Rollup configuration file to simplify command line usage and enable ... npm run build -- --environment BUILD:development.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
When using browsersync at localhost:3000 Drupal will see the hot reloaded js file and auto reloads the page when you change something in the src/javascripts folder
For the general “why am I not seeing processed JS files in my build directory” question, see https://github.com/vigetlabs/blendid/issues/494#issuecomment-343545781 (thanks @HJ-b!)
Without additional information, it sounds like the other problems were likely related to Browersync configuration or paths.
@nilsenpaul there isn’t currently a way to override the JS task. Feel free to open a new issue if that’s something you think would be useful and we can discuss
@guusvandewal glad you had success! Are you saying that
./profiles/PROFILENAME/
is necessary in thejavascripts.publicPath
? And wasnecessary for Drupal 8? The rest of your configuration is as in https://github.com/vigetlabs/blendid/blob/master/extras/drupal/config/task-config.js. We may need to add or document the jquery requirement.