fire.app/webpack.config.js

40 lines
781 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 = {
2020-02-29 16:47:16 +03:00
mode: "development",
2020-02-08 13:37:13 +03:00
entry: {
2020-02-29 16:47:16 +03:00
index: "./src/main.ts"
2020-02-08 13:37:13 +03:00
},
output: {
2020-02-29 16:47:16 +03:00
library: "bootstrap",
2020-02-08 13:37:13 +03:00
path: path.resolve(__dirname, outputDirectory),
2020-02-29 16:47:16 +03:00
libraryExport: "default",
publicPath: `/boorstrap/${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: {
2020-03-28 23:03:10 +03:00
extensions: [".ts", ".js"]
2020-02-08 13:37:13 +03:00
},
module: {
rules: [
{ parser: { system: false } },
{
test: /\.tsx?$/,
2020-02-29 16:47:16 +03:00
loader: "awesome-typescript-loader"
2020-02-08 13:37:13 +03:00
},
{
test: /\.(jpe?g|gif|png|svg|woff|ttf|eot|wav|mp3)$/,
2020-02-29 16:47:16 +03:00
loader: "file-loader"
2020-02-08 13:37:13 +03:00
}
]
}
};