Revert "Babel: use babel-loader instead of ts-loader, ng-annotate with babel-plugin-angularjs-annotate (#21554)" (#21570)

This reverts #21554 which caused problems with e2e.
This reverts commit e7e0d18bc8.
This commit is contained in:
Dominik Prokop
2020-01-17 15:52:56 +01:00
committed by Marcus Efraimsson
parent c738a889ed
commit 8bc4ef3e9c
6 changed files with 254 additions and 538 deletions
+35 -41
View File
@@ -7,7 +7,7 @@ const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const HtmlWebpackHarddiskPlugin = require('html-webpack-harddisk-plugin');
const CleanWebpackPlugin = require('clean-webpack-plugin');
const IgnoreNotFoundExportPlugin = require('./IgnoreNotFoundExportPlugin.js');
const IgnoreNotFoundExportPlugin = require("./IgnoreNotFoundExportPlugin.js");
module.exports = merge(common, {
mode: 'development',
@@ -36,56 +36,50 @@ module.exports = merge(common, {
'!/public/build': 'http://localhost:3000',
},
watchOptions: {
ignored: /node_modules/,
},
ignored: /node_modules/
}
},
optimization: {
removeAvailableModules: false,
runtimeChunk: false,
removeEmptyChunks: false,
splitChunks: false,
splitChunks: false
},
module: {
rules: [
{
rules: [{
test: /\.tsx?$/,
exclude: /node_modules/,
use: [
{
loader: 'babel-loader',
options: {
cacheDirectory: true,
babelrc: false,
plugins: [
[
require('@rtsao/plugin-proposal-class-properties'),
{
loose: true,
use: [{
loader: 'babel-loader',
options: {
cacheDirectory: true,
babelrc: false,
plugins: [
[require('@rtsao/plugin-proposal-class-properties'), {
loose: true
}],
'angularjs-annotate',
'@babel/plugin-syntax-dynamic-import', // needed for `() => import()` in routes.ts
'react-hot-loader/babel',
],
presets: [
[
'@babel/preset-env',
{
targets: {
browsers: 'last 3 versions'
},
],
'angularjs-annotate',
'@babel/plugin-syntax-dynamic-import', // needed for `() => import()` in routes.ts
'react-hot-loader/babel',
useBuiltIns: 'entry',
modules: false
},
],
presets: [
[
'@babel/preset-env',
{
targets: {
browsers: 'last 3 versions',
},
useBuiltIns: 'entry',
modules: false,
},
],
'@babel/preset-typescript',
'@babel/preset-react',
],
},
'@babel/preset-typescript',
'@babel/preset-react',
],
},
],
}, ],
},
{
test: /\.scss$/,
@@ -96,13 +90,13 @@ module.exports = merge(common, {
loader: 'postcss-loader',
options: {
config: {
path: __dirname + '/postcss.config.js',
path: __dirname + '/postcss.config.js'
},
},
},
{
loader: 'sass-loader',
},
loader: 'sass-loader'
}
],
},
{
@@ -119,7 +113,7 @@ module.exports = merge(common, {
template: path.resolve(__dirname, '../../public/views/index-template.html'),
inject: 'body',
alwaysWriteToDisk: true,
chunksSortMode: 'none',
chunksSortMode: 'none'
}),
new HtmlWebpackHarddiskPlugin(),
new webpack.NamedModulesPlugin(),