@@ -4,7 +4,6 @@ const HtmlWebpackPlugin = require('html-webpack-plugin');
44const MiniCssExtractPlugin = require ( 'mini-css-extract-plugin' ) ;
55const workboxPlugin = require ( 'workbox-webpack-plugin' ) ;
66const ModernizrWebpackPlugin = require ( 'modernizr-webpack-plugin' ) ;
7- // const nodeExternals = require('webpack-node-externals');
87const 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 : / \. j s x ? $ / ,
37- exclude : [ nodeModulesDir ] ,
38- use : [ 'react-hot-loader/webpack' , 'babel-loader' ] ,
39- } ,
40- {
41- test : / \. t s x ? $ / ,
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 : / \. t s ( 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/'
0 commit comments