Last active
December 25, 2019 15:56
-
-
Save ShizukuIchi/4eb2d36fbe1abe96864e3d3aad01e80b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const path = require('path'); | |
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin'); | |
const HtmlWebpackPlugin = require('html-webpack-plugin'); | |
module.exports = { | |
entry: path.resolve(__dirname, 'src/index.ts'), | |
output: { | |
filename: 'bundle.js', | |
path: path.resolve(__dirname, 'dist'), | |
}, | |
resolve: { | |
extensions: ['.ts', '.js', '.json'], | |
}, | |
module: { | |
rules: [ | |
{ test: /\.(ts|js)$/, loader: 'babel-loader', exclude: /node_modules/ }, | |
{ | |
test: /\.svg$/i, | |
use: [ | |
{ | |
loader: 'url-loader', | |
options: { | |
limit: 8192, | |
}, | |
}, | |
], | |
}, | |
], | |
}, | |
plugins: [ | |
new ForkTsCheckerWebpackPlugin({ eslint: true }), | |
new HtmlWebpackPlugin({ | |
template: path.resolve(__dirname, 'src/index.html'), | |
}), | |
], | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment