setup a eslint/prettier setup with plugins, and a basic webpack setup
This commit is contained in:
30
webpack.config.ts
Normal file
30
webpack.config.ts
Normal 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;
|
||||
};
|
||||
Reference in New Issue
Block a user