setup a eslint/prettier setup with plugins, and a basic webpack setup

This commit is contained in:
Vu Nguyen
2021-01-14 22:54:40 -06:00
parent ba3182fd59
commit b9cfc9b18e
14 changed files with 10807 additions and 72 deletions

30
webpack.config.ts Normal file
View File

@@ -0,0 +1,30 @@
import * as path from 'path';
import * as webpack from 'webpack';
export default (): webpack.Configuration[] => {
const cfgs: webpack.Configuration[] = [];
const chromeExtCfg: webpack.Configuration = {
entry: {
app: [path.join(__dirname, 'src', 'app.tsx')],
},
module: {
rules: [
{
test: /\.(js|jsx|ts|tsx)$/,
use: 'ts-loader',
},
],
},
output: {
filename: '[name].js',
path: path.join(__dirname, 'dist', 'chrome'),
},
plugins: [],
resolve: {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
};
cfgs.push(chromeExtCfg);
return cfgs;
};