WIP babel 7

This commit is contained in:
David Kaltschmidt
2018-10-29 12:18:41 +01:00
parent 1f6df77a80
commit c1347e4ecb
6 changed files with 842 additions and 44 deletions

View File

@ -47,7 +47,7 @@ module.exports = merge(common, {
module: {
rules: [
{
test: /\.tsx?$/,
test: /\.(j|t)sx?$/,
exclude: /node_modules/,
use: [{
loader: 'babel-loader',
@ -55,17 +55,23 @@ module.exports = merge(common, {
cacheDirectory: true,
babelrc: false,
plugins: [
'syntax-dynamic-import',
["@babel/plugin-proposal-class-properties", { loose: true }],
'angularjs-annotate',
'syntax-dynamic-import', // needed for `() => import()` in routes.ts
'react-hot-loader/babel'
]
],
presets: [
[
'@babel/preset-env',
{
targets: { browsers: 'last 3 versions' },
useBuiltIns: 'entry'
}
],
'@babel/preset-typescript',
'@babel/preset-react'
],
}
},
{
loader: 'ts-loader',
options: {
transpileOnly: true,
experimentalWatchApi: true
},
}],
},
{