watchify

How to make using tsify with the AMD module system result in a bundle file, not in separate files or a file that uses the not-found `define`?

只谈情不闲聊 提交于 2020-04-17 22:39:31
问题 I do not care which module system I use if I am able to use the ES6 TypeScript import/export syntax. Why does AMD put just main.ts in the bundle.js file, while UMD puts all the needed modules in it? How can I use AMD (which I understood that is good for the browsers) so that the bundle.js file contains all the needed code? I just change between AMD and UMD and the file size changes accordingly: AMD: 1879 bytes written to js/bundle.js (0.06 seconds) at 14:57:28 UMD: 164682 bytes written to js

Command to watch and bundle using brfs without watchify

↘锁芯ラ 提交于 2020-01-15 06:33:46
问题 I'm trying to replicate the behavior of watchify with the brfs transform, but I need to use brfs directly because I want to avoid the additional code added to the script when using require with browserify/watchify. Using brfs directly simply replaces require(theFile) with its contents and nothing else. Using this command to bundle the following code produces my intended result: brfs main.js > bundle.js // main.js var fs = require('fs'); var templates = { 'header': fs.readFileSync('app

Command to watch and bundle using brfs without watchify

折月煮酒 提交于 2020-01-15 06:33:07
问题 I'm trying to replicate the behavior of watchify with the brfs transform, but I need to use brfs directly because I want to avoid the additional code added to the script when using require with browserify/watchify. Using brfs directly simply replaces require(theFile) with its contents and nothing else. Using this command to bundle the following code produces my intended result: brfs main.js > bundle.js // main.js var fs = require('fs'); var templates = { 'header': fs.readFileSync('app

Can anyone let me know why am I getting this error?

左心房为你撑大大i 提交于 2019-12-25 18:35:26
问题 I am just starting to learn ReactJS with NodeJS and trying to run an application through NPM but just right on start I am getting the following error as : You MUST specify an outfile with -o. My Starting Command : watchify src/main.jsx -v -t [ babelify --presets [ react ]] -o public/js/main.js Whole Error : C:\Users\Umair Shah Yousafzai\react-skeleton>npm start > react-skeleton@1.0.0 start C:\Users\Umair Shah Yousafzai\react-skeleton > watchify src/main.jsx -v -t [ babelify --presets [ react

Watchify + tsify + Visual Studio == stale code

为君一笑 提交于 2019-12-24 10:57:48
问题 We are running a Gulp task inside of Visual Studio (2015) to execute watchify. Works great some of the time, but sometimes watchify builds old code. Repro: Modify a .ts file in Visual Studio Save In the Task Runner Explorer, watch for watchify output, indicating that it ran (it does) Refresh Chrome/clear cache (I use the "disable caching while debug window is open" option in Chrome) View source in the Chrome Debugger (a little less than half the time, it will be the old code) Any idea what I

Browserify watchify compile old ressource on localhost with VueComponent

爱⌒轻易说出口 提交于 2019-12-24 07:21:26
问题 I'm pretty new on compiler and npm command. I use this starter for a project https://github.com/vuejs-templates/browserify-simple I served my project and I was working on when I update a script (I'm working with Single File Component - VueJS) and now the output "dist.js" is still in error due to old script. I have reinstall, create a new project, I copy my new sources and when I launch the command "npm run dev" I have the same error due to script which does't exist anymore. TypeError: Cannot

Browserify watchify compile old ressource on localhost with VueComponent

Deadly 提交于 2019-12-24 07:20:09
问题 I'm pretty new on compiler and npm command. I use this starter for a project https://github.com/vuejs-templates/browserify-simple I served my project and I was working on when I update a script (I'm working with Single File Component - VueJS) and now the output "dist.js" is still in error due to old script. I have reinstall, create a new project, I copy my new sources and when I launch the command "npm run dev" I have the same error due to script which does't exist anymore. TypeError: Cannot

Browserify and Reactify source maps include full local path names

≡放荡痞女 提交于 2019-12-24 04:15:50
问题 I use watchify/ browserify to create a bundle with debug source maps with this command- watchify main.js -o bundle.js -v -d When I use Chrome DevTools to debug the resulting app, the source files are accessible in their orginal nested folder locations, visible in DevTools' Sources panel. However when I run it through reactify with this command- watchify main.js -t reactify -o bundle.js -v -d Chrome DevTools shows all the source files in the same folder as bundle.js and the file name includes

get blob error after using watchify to make a bundle

雨燕双飞 提交于 2019-12-11 05:30:53
问题 What I am trying to do? I want to create a project using node modules and es6 javascript syntax. To make it as modular and independent as it is possible, I decided to switch to watchify. My html page is looking something like this ...some unrelated html code <dib id='content'></div> <script type='text/javascript' src='correct(checked) path to my bundle.js file'></script> ...some unrelated html code my whatchify command is look like this watchify src/app.js -o destination/bundle.js -t

gulp browserify reactify task is quite slow

ε祈祈猫儿з 提交于 2019-12-03 09:45:07
问题 I am using Gulp as my task runner and browserify to bundle my CommonJs modules. I have noticed that running my browserify task is quite slow, it takes around 2 - 3 seconds, and all I have is React and a few very small components I have built for development. Is there a way to speed up the task, or do I have any noticeable problems in my task? gulp.task('browserify', function() { var bundler = browserify({ entries: ['./main.js'], // Only need initial file transform: [reactify], // Convert JSX