-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Internet explorer #82
Comments
Well, in short - yes, but not very soon. In other hand - if you will create a PR which provides that support - I'll add it to the lib |
@treago : Thanks ! Any chance I can validate this package ? |
@treago your PR now merged and available in version v2.1.4. |
@treago : Still having an issue when launching our site |
@bartdk-be okay, form what I see you use So, I don't know how do you assemble your bundle, but you can try to import jsvat explicitly, like P.S. I'd like to know a bit more about the way you build the project and version of IE you do use |
Even with the require, IE seems to fail.
|
Well, I tried it myself and it basically works, the only thing - I implement it with react and react requires if you will create basic react app with create-react-app or similar setup (I basically used webstorm's template). Your index.js // This must be the first line in src/index.js
import 'react-app-polyfill/ie11'; // <--- IMPORTANT for react
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import * as serviceWorker from './serviceWorker';
ReactDOM.render(<App />, document.getElementById('root'));
// If you want your app to work offline and load faster, you can change
// unregister() to register() below. Note this comes with some pitfalls.
// Learn more about service workers: https://bit.ly/CRA-PWA
serviceWorker.unregister(); App.js import React, {useState} from 'react';
import './App.css';
// this is works
// const {austria, belgium, checkVAT} = require('jsvat/lib/commonjs');
// this is also works
import {austria, belgium, checkVAT} from 'jsvat/lib/commonjs';
function App() {
const [vat, setVat] = useState('BE0411905847');
return (
<div className="App">
<header className="App-header">
<input type="text" value={vat} onChange={({target}) => setVat(target ? target.value : '')}/>
<br/>
Result of jsvat:
<div id="result">
<ul>
<li>Belgium: {checkVAT(vat, [belgium]).isValid.toString()}</li>
<li>Austria: {checkVAT(vat, [austria]).isValid.toString()}</li>
</ul>
</div>
</header>
</div>
);
}
export default App; My package,json: {
"name": "jsvat-demo-react",
"version": "0.1.0",
"private": true,
"dependencies": {
"jsvat": "^2.1.4",
"react": "^16.10.2",
"react-app-polyfill": "^1.0.4",
"react-dom": "^16.10.2",
"react-scripts": "3.2.0"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": {
"production": [
"ie 11" // I guess it's also important
],
"development": [
"ie 11"
]
}
}
So, basically it works for me in IE11 on windows |
Hi there, any news about the IE11 issue? This library is very useful, but missing IE support is a huge lack. Any ideas how to solve the issue? |
Any plans to make the latest version compatible with Internet Explorer 11 ?
The text was updated successfully, but these errors were encountered: