didierfranc / vscode-react-intellisense Goto Github PK
View Code? Open in Web Editor NEWA blank project to get Intellisense for React in Visual Studio Code
License: MIT License
A blank project to get Intellisense for React in Visual Studio Code
License: MIT License
I was having Node 4.0 and i have the following depepdencies in my package.json
"dependencies": {
"babel-preset-es2015": "^6.6.0",
"babel-preset-react": "^6.5.0",
"babelify": "^7.2.0",
"browserify": "^11.0.1",
"express": "^4.13.4",
"react": "^15.0.1",
"react-dom": "^15.0.1",
"watchify": "^3.4.0"
}
when i try to do bablify ReactDom code is not able to transform
src: https://github.com/didierfranc/vscode-react-intellisense/tree/master/public/index.js
ReactDOM.render(, document.getElementById('content'));
Expect transform in bundle.js as
_reactDom.render(_react2.default.createElement(HelloMessage, { name: 'Mark' }), document.getElementById('content'));
but it is not transform instead i have the same line in bundle.js
ReactDOM.render(, document.getElementById('content'));
https://github.com/babel/babelify
how can i fix this ?
Great repo!
There is just one thing I don't understand. If I want to this to my existing project, what are the steps?
I've added the preinstall script to my package.json
.
"scripts": {
"preinstall": "npm i typings -D && typings i dt~react dt~react-dom -G -D",
"dev": "webpack-dev-server --port 3000 --progress --profile --colors",
"build": "webpack -p --progress --colors"
},
This is my json.config
:
{
"compilerOptions": {
"target": "es6",
"allowSyntheticDefaultImports": true
},
"exclude": [
"node_modules"
]
}
In .vscode/settings.json
I have the following code:
{
"files.associations": {
"*.js": "javascriptreact",
"*.jsx": "javascriptreact"
},
"javascript.validate.enable": true
}
And I have the typings.json
in project root, and also the /typings
directory.
Is there anything else I need to do? Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.