Closed arnekolja closed 8 years ago
You may try babel-preset-react to use jsx with babelify.
The dist version requires window.React
available.
I have that already, it is the setup that is not working. Could you provide an example that's using it?
I am too getting error while importing...
ERROR in D:/[...]/~/input-moment/src/input-moment.js Module parse failed: D:\[...]\node_modules\input-moment\src\input-moment.js Line 28: Unexpected token < You may need an appropriate loader to handle this file type. | | return ( | <div className="m-input-moment"> | <div className="options"> | <button type="button" className={cx('ion-calendar im-btn', {'is-active': tab === 0})} onClick={this.handleClickTab.bind(null, 0)}> @ D:/[...]/~/input-moment/index.js 1:17-46
Me three, I'm getting error importing ...
Getting the same error as @rskumar
Facing the same Issue
+1
Hi,
I am having problems importing your library.
import InputMoment from 'input-moment'
throws an unexpected token error on JSX-style html tags in your code (uncompiled JSX). When importing from the dist folder it compiles (
import InputMoment from 'input-moment/dist/input-moment'
), but then I get the error:ReferenceError: Can't find variable: React | input-moment.js:1
Do you have any idea why? Is it a bug in deployment or is it just me? :-) I'm trying it on a project that works like a charm otherwise, built by a gulp build script using babelify+browserify.