Commit 75a33c92 authored by Stanislav Fifik's avatar Stanislav Fifik

jsx and typescript support

parent 3451740b
......@@ -43,7 +43,7 @@ module.exports = {
],
BABEL_CONFIG: {
presets: ['env'],
presets: ['env', 'react'],
babelrc: false,
compact: false
},
......@@ -152,7 +152,14 @@ module.exports = {
devServer: { stats: "errors-only"},
amd: true,
resolve: {
extensions: ['.js', '.vue', '.json'],
extensions: [
'.js',
'.vue',
'.json',
'.tsx',
'.ts',
'jsx'
],
alias: {
'vue$': 'vue/dist/vue.esm.js',
'@': './js/'
......@@ -168,7 +175,7 @@ module.exports = {
module: {
rules: [
{
test: /\.js$/,
test: /\.jsx?$/,
include: module.exports.BABEL_NPM_MODULES.map((lib) => new RegExp(`node_modules/${lib}`)),
use: {
loader: 'babel-loader',
......@@ -190,6 +197,11 @@ module.exports = {
}
}
},
{
test: /\.tsx?$/,
loader: 'ts-loader',
exclude: /node_modules/,
},
]
},
plugins: [
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment