Switch from babel to typescript for initial ext conversion

This commit is contained in:
hensm
2019-02-25 14:34:27 +00:00
parent e4dffe0cce
commit b7571791e2
13 changed files with 217 additions and 1342 deletions

View File

@@ -21,7 +21,7 @@ module.exports = (env) => ({
}
, output: {
filename: "[name].js"
, path: `${env.outputPath}`
, path: env.outputPath
}
, plugins: [
new webpack.DefinePlugin({
@@ -65,23 +65,14 @@ module.exports = (env) => ({
, module: {
rules: [
{
test: /\.jsx?$/
test: /\.(js|ts)x?$/
, resolve: {
extensions: [ ".js", ".jsx" ]
extensions: [ ".js", ".jsx"
, ".ts", ".tsx" ]
}
, include: `${env.includePath}`
, include: env.includePath
, use: {
loader: "babel-loader"
, options: {
presets: [
"@babel/preset-react"
]
, plugins: [
"@babel/proposal-class-properties"
, "@babel/proposal-do-expressions"
, "@babel/proposal-object-rest-spread"
]
}
loader: "ts-loader"
}
}
]