Skip to content

Commit

Permalink
use babel-preset-typescript instead of awesome-typescript-loader
Browse files Browse the repository at this point in the history
  • Loading branch information
one-more committed Sep 4, 2019
1 parent 7b3405e commit 9d80884
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 25 deletions.
10 changes: 10 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"presets": [
"@babel/env",
"@babel/preset-typescript"
],
"plugins": [
"@babel/proposal-class-properties",
"@babel/proposal-object-rest-spread"
]
}
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@
"private": false,
"devDependencies": {
"@babel/core": "^7.5.5",
"@babel/plugin-proposal-class-properties": "^7.5.5",
"@babel/plugin-proposal-object-rest-spread": "^7.5.5",
"@babel/preset-env": "^7.5.5",
"@babel/preset-typescript": "^7.3.3",
"@types/react": "^16.9.2",
"awesome-typescript-loader": "^5.2.1",
"@types/react-dom": "^16.9.0",
"babel-loader": "^8.0.6",
"clean-webpack-plugin": "^3.0.0",
"lerna": "^3.15.0",
"typescript": "^3.6.2",
Expand Down
3 changes: 3 additions & 0 deletions packages/core/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "../../.babelrc"
}
3 changes: 3 additions & 0 deletions packages/framework/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "../../.babelrc"
}
8 changes: 0 additions & 8 deletions packages/framework/dependencies.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,6 @@ declare module '@micro-frontends/core' {
function store<T>(key: StorageKey, value: T): void;
}

declare module react {
interface ReactElement {}
}

declare module 'react-dom' {
function render(element: react.ReactElement, container: Element): void;
}

declare module 'vue' {
interface VueConstructor {}
export default class Vue {
Expand Down
7 changes: 3 additions & 4 deletions packages/framework/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
"build": "webpack --config webpack.config.js && tsc --declaration --outDir dist/ --emitDeclarationOnly",
"prepublish": "build"
},
"keywords": ["micro-frontends"],
"keywords": [
"micro-frontends"
],
"author": "one-more",
"contributors": [
"master-7"
Expand All @@ -19,8 +21,5 @@
"react-dom": "^16.8.6",
"vue": "^2.6.10"
},
"dependencies": {
"styled-components": "^4.3.1"
},
"gitHead": "1649eb321d10c42b3136961c9a34edf4b57c894a"
}
13 changes: 1 addition & 12 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,11 @@ const { CleanWebpackPlugin } = require('clean-webpack-plugin');

module.exports = {
mode: 'production',

module: {
rules: [
{
test: /\.ts$/,
loader: "awesome-typescript-loader",
options: {
"useBabel": true,
"babelOptions": {
"babelrc": true,
"presets": [
["@babel/preset-env", { "targets": "last 2 versions, ie 11", "modules": false }]
]
},
"babelCore": "@babel/core",
}
loader: "babel-loader",
},
]
},
Expand Down

0 comments on commit 9d80884

Please sign in to comment.