Comments (3)
Working setup:
- add devDependencies
@babel/core
@babel/plugin-proposal-class-properties
@babel/plugin-proposal-object-rest-spread
@babel/preset-env
@babel/preset-typescript
babel-loader
typescript
- generate tsconfig.json
tsc --init --declaration --allowSyntheticDefaultImports --target esnext --outDir lib
- add .babelrc
presets: ["@babel/preset-env", "@babel/preset-typescript"]
plugins: [“@babel/plugin-proposal-class-properties", "@babel/proposal-object-rest-spread"]
- Update webpack.config.js
module: {rules: [{test: /\.(ts|js)x?$/, use: ['babel-loader'], exclude: /node_modules/,},]},
resolve: {extensions: ['.ts', '.tsx', '.js', '.json']}
- Update package.json scripts
"type-check": "tsc --noEmit",
"type-check:watch": "npm run type-check -- --watch",
"build:types": "tsc --emitDeclarationOnly",
"build:js": "webpack --mode=production",
"build": "npm run build:types && npm run build:js"
from d3-webpack-babel-typescript.
Instead of .babelrc
, add the file called babel.config.js
as required by test workflow documented in #5
from d3-webpack-babel-typescript.
Commit: 5e56c0e
from d3-webpack-babel-typescript.
Related Issues (10)
- ES6 (ES2015) module imports not working HOT 3
- Add treemap chart to vizintel-charts library
- Add Production workflow HOT 1
- Dev workflow with stackbar & real data HOT 2
- Implement Test workflow HOT 1
- API maxValue unit test failing due to `categories` API not implemented HOT 1
- Add Demo workflow HOT 1
- Make webpack config DRY
- Publish library to NPM HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from d3-webpack-babel-typescript.