mirror of
https://github.com/fluencelabs/avm-runner-background
synced 2025-03-14 21:10:50 +00:00
37 lines
760 B
JavaScript
37 lines
760 B
JavaScript
// Generated using webpack-cli https://github.com/webpack/webpack-cli
|
|
|
|
const path = require('path');
|
|
|
|
const isProduction = true;
|
|
// uncomment to debug
|
|
// const isProduction = false;
|
|
|
|
const config = {
|
|
entry: './src/index.ts',
|
|
output: {
|
|
path: path.resolve('dist'),
|
|
},
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.(ts|tsx)$/i,
|
|
use: 'ts-loader',
|
|
exclude: ['/node_modules/', '/src/BackgroundWorker.ts', '/src/index.ts'],
|
|
},
|
|
],
|
|
},
|
|
resolve: {
|
|
extensions: ['.tsx', '.ts', '.js'],
|
|
},
|
|
};
|
|
|
|
module.exports = () => {
|
|
if (isProduction) {
|
|
config.mode = 'production';
|
|
} else {
|
|
config.mode = 'development';
|
|
}
|
|
|
|
return config;
|
|
};
|