fire.app/webpack.config.js

35 lines
633 B
JavaScript
Raw Normal View History

2020-02-08 13:37:13 +03:00
const path = require('path');
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
const outputDirectory = 'dist';
2020-02-29 16:47:16 +03:00
const pkg = require('./package.json')
2020-02-08 13:37:13 +03:00
module.exports = {
entry: {
index: './src/main.ts'
2020-02-08 13:37:13 +03:00
},
output: {
library: 'fireapp',
2020-02-08 13:37:13 +03:00
path: path.resolve(__dirname, outputDirectory),
libraryExport: 'default',
2020-03-31 00:16:30 +03:00
publicPath: `/fireapp/${pkg.version}/`
2020-02-08 13:37:13 +03:00
},
2020-02-29 16:47:16 +03:00
plugins: [new CleanWebpackPlugin()],
2020-02-08 13:37:13 +03:00
resolve: {
extensions: ['.ts', '.js']
2020-02-08 13:37:13 +03:00
},
module: {
rules: [
{ parser: { system: false } },
{
test: /\.tsx?$/,
loader: 'babel-loader'
2020-02-08 13:37:13 +03:00
}
]
}
};