Skip to content

Commit 55f78ec

Browse files
committed
migration
1 parent 50d7cab commit 55f78ec

2 files changed

Lines changed: 15 additions & 29 deletions

File tree

front/webpack.dev.config.js

Lines changed: 14 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ const HtmlWebpackPlugin = require('html-webpack-plugin');
44
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
55
const workboxPlugin = require('workbox-webpack-plugin');
66
const ModernizrWebpackPlugin = require('modernizr-webpack-plugin');
7-
// const nodeExternals = require('webpack-node-externals');
87
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
98

109
// #region constants`
@@ -17,39 +16,26 @@ const config = {
1716
mode: 'development',
1817
devtool: 'source-map',
1918
entry: {
20-
app: ['react-hot-loader/patch', indexFile],
19+
app: [indexFile],
2120
},
22-
resolve: {
23-
modules: ['src', 'node_modules'],
24-
extensions: ['.css', '.json', '.js', '.jsx', '.ts', '.tsx'],
25-
},
26-
// externals: [nodeExternals()], // in order to ignore all modules in node_modules folder
2721
output: {
28-
path: path.join(__dirname, 'docs/assets'),
22+
path: path.join(__dirname, '../docs/assets'),
2923
publicPath: '/assets/',
3024
filename: '[name].[hash].js',
3125
chunkFilename: '[name].[hash].js',
3226
},
27+
resolve: {
28+
modules: ['node_modules'],
29+
alias: {
30+
'react-dom': '@hot-loader/react-dom',
31+
},
32+
extensions: ['.css', '.json', '.js', '.jsx', '.ts', '.tsx'],
33+
},
3334
module: {
3435
rules: [
3536
{
36-
test: /\.jsx?$/,
37-
exclude: [nodeModulesDir],
38-
use: ['react-hot-loader/webpack', 'babel-loader'],
39-
},
40-
{
41-
test: /\.tsx?$/,
42-
use: [
43-
{
44-
loader: 'react-hot-loader/webpack',
45-
},
46-
{
47-
loader: 'ts-loader',
48-
options: {
49-
transpileOnly: true,
50-
},
51-
},
52-
],
37+
test: /\.ts(x)?$/,
38+
use: ['awesome-typescript-loader'],
5339
exclude: [nodeModulesDir],
5440
},
5541
{
@@ -89,9 +75,9 @@ const config = {
8975
},
9076
},
9177
plugins: [
92-
new ForkTsCheckerWebpackPlugin({
93-
checkSyntacticErrors: false,
94-
}),
78+
// new ForkTsCheckerWebpackPlugin({
79+
// checkSyntacticErrors: false,
80+
// }),
9581
new HtmlWebpackPlugin({
9682
template: 'src/index.html',
9783
filename: '../index.html', // hack since outPut path would place in '/dist/assets/' in place of '/dist/'

front/webpack.hot.reload.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ const config = {
165165
alias: {
166166
'react-dom': '@hot-loader/react-dom',
167167
},
168-
extensions: ['.ts', '.tsx', '.js', '.jsx'],
168+
extensions: ['.ts', '.tsx', '.js', '.jsx', '.css', '.json'],
169169
},
170170
module: {
171171
rules: [

0 commit comments

Comments
 (0)