Babelify plugs Babel's transpilation tools into the Browserify pipeline.
Questions tagged [babelify]
53 questions
0
votes
1 answer
Cannot find module 'react (gulp babelify browerify)
When I run npm run gulp all worked when creating the javascript. But when I run the javascript inside the browser the following error appears:
_prelude.js:1 Uncaught Error: Cannot find module 'react'
at o (_prelude.js:1)
I installed react and…

Kordi
- 2,405
- 1
- 14
- 13
0
votes
1 answer
Babelify used with tsify and firebase does not generate correct code
I have landed at this point after a long chain of changes to my build environment. I never used babel because it was not neccessary. But including the firebase package broke the build and all solutions I found online suggested using babel to…

Matthias
- 267
- 4
- 9
0
votes
1 answer
Cannot call functions after running browserify
I have a an es6 JS class below which I am running through browserify to output in es5. Below is my es6 JS class:
import $j from "jquery";
import BaseComponent from './Components/base-component';
class QuestionnaireView extends BaseComponent…

James Blackburn
- 594
- 4
- 23
0
votes
1 answer
ParseError: 'import' and 'export' may appear only with 'sourceType: module', browserify
I am using django-compressor and I want to es5/es6 features on my project. I am setting the pre-compiler option as follow:
NODE_MODULES = BASE_DIR / 'node_modules'
COMPRESS_PRECOMPILERS = (
('text/javascript',
'browserify {{infile}} -t…

adnanmuttaleb
- 3,388
- 1
- 29
- 46
0
votes
1 answer
Browserify and Babelify give {classname} is not defined error
Given this TS file:
export default class Rob {
Start(): void {
console.log("Hello, world!");
}
}
Which I am transforming with a Grunt task that looks like this:
browserify: {
rob: {
src: "./rob/rob.js",
dest:…

glosrob
- 6,631
- 4
- 43
- 73
0
votes
1 answer
Problem in gulp.task syntax using browserify + babel
It is my first query in this place, I am learning to program, and I am following a course that is from the year 2016 in which they implement babel gulp browserify sass, but I have a problem trying to do a transform using babel inside a gulp.task.…
0
votes
1 answer
Use Babelify with Browserify Globally / Global in WebStorm
Background:
I have several vanilla JS projects with files up to 25 000 lines / single file in which I would like to use ES6 capabilities + require so I can make the code more readable. OS X guy by the way
Possible solution:
I could make up a…

digitalzoomstudio
- 1,112
- 1
- 15
- 30
0
votes
0 answers
How to configure babelify to convert javascript files to IE 11 compatible
I have a node js library which I would like to reuse within a browser IE 11.
I tried using the following command to convert the code to IE 11 compatible but looks like I am missing some configuration.
> browserify Module.js --standalone mymodule…

developer
- 1,401
- 4
- 28
- 73
0
votes
0 answers
Browserify for Angular, How to fix: 'Can't resolve all parameters for ApplicationModule'
Building an Angular app without the Angular cli
(i.e. no ng-serve or ng-build).
So I am transpiling and getting the polyfills with the tools below
Tools/packages:
I am using gulp to run each task I need.
I am also using @babel/polyfill, babelify,…

crabman84
- 77
- 8
0
votes
3 answers
Error after upgrading to Babel 7: Requires Babel "^7.0.0-0", but was loaded with "6.26.3"
I upgraded to Babel 7 using https://github.com/babel/babel-upgrade and now have an error relating to grunt/browserify.
In grunt file:
browserify: {
options: {
watch: true,
transform: [['babelify', {
presets: ['@babel/preset-env',…

user2132190
- 373
- 1
- 2
- 17
0
votes
1 answer
Can not find modules while building the project with signalr package
I'm trying to use signalR in my react app. When I'm importing it like this:
import { HubConnection } from '@aspnet/signalr-client';
The build is going fine without uglify. But when I use uglify() it fails because of incompatibility of uglify and…

Nikita Fedorov
- 790
- 1
- 12
- 40
0
votes
2 answers
"Unexpected token" will trying react-datepicker
I'm trying to set up the code provided on the page of the react-datepicker.
My build toolchain is composed of npm and browserify.
I have the following package.json
{
"name": "datepicker",
"version": "1.0.0",
"description": "",
"main":…

Jérôme B
- 420
- 1
- 6
- 25
0
votes
1 answer
Gulp Task Failing - Browserify/Babel Incompatibility?
I've inherited a rather unusual website that is a hybrid of C# and Node JS (using TypeScript). We have a continuous integration environment set up on Azure DevOps to build the website and deploy it to a test environment. We've not had to build the…

MarkShep
- 161
- 1
- 4
0
votes
2 answers
Vue "ParseError: 'import' and 'export' may appear only with 'sourceType: module'"
I am trying to import a node module into my Vue project and am getting the following error:
ParseError: 'import' and 'export' may appear only with 'sourceType: module'
I understand that this is probably due to the node module not being transformed…

timothyylim
- 1,399
- 2
- 14
- 32
0
votes
2 answers
React cannot import CSS file, and throws an error
I'm new to React and gulp and I'm trying to build a sample project. I managed to include a React task for gulp, to convert my react entry file (App.js), but the problem is that whenever I insert a rule in my CSS file which is imported in my App.js,…

Amir Shahbabaie
- 1,352
- 2
- 14
- 33