migrate to typescript, with fixes
This commit is contained in:
		
							
								
								
									
										33
									
								
								webpack.config.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										33
									
								
								webpack.config.js
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,33 @@ | ||||
| const path = require('path'); | ||||
| const CopyPlugin = require('copy-webpack-plugin'); | ||||
|  | ||||
| module.exports = { | ||||
|     mode: 'production', | ||||
|     entry: { | ||||
|         background: './src/background/index.ts', | ||||
|         content: './src/content/index.ts', | ||||
|         popup: './src/popup/index.ts', | ||||
|     }, | ||||
|     // devtool: 'inline-source-map', | ||||
|     output: { | ||||
|         path: path.resolve(__dirname, 'dist'), | ||||
|         filename: 'scripts/[name].bundle.js' | ||||
|     }, | ||||
|     module: { | ||||
|         rules: [ | ||||
|             { | ||||
|                 test: /\.tsx?$/, | ||||
|                 use: 'ts-loader', | ||||
|                 exclude: /node_modules/ | ||||
|             } | ||||
|         ] | ||||
|     }, | ||||
|     resolve: { | ||||
|         extensions: ['.tsx', '.ts', '.js'] | ||||
|     }, | ||||
|     plugins: [ | ||||
|         new CopyPlugin([ | ||||
|             { from: '**/*', to: '.', toType: "dir" }, | ||||
|         ], { context: 'template', logLevel: 'warn' }), | ||||
|     ] | ||||
| }; | ||||
		Reference in New Issue
	
	Block a user