Skip to content

Instantly share code, notes, and snippets.

@ShizukuIchi
Last active December 25, 2019 15:56
Show Gist options
  • Save ShizukuIchi/4eb2d36fbe1abe96864e3d3aad01e80b to your computer and use it in GitHub Desktop.
Save ShizukuIchi/4eb2d36fbe1abe96864e3d3aad01e80b to your computer and use it in GitHub Desktop.
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