This repository has been archived on 2020-03-24. You can view files and clone it, but cannot push or open issues or pull requests.
quay/config_app/webpack.config.js

62 lines
1.3 KiB
JavaScript
Raw Normal View History

const webpack = require('webpack');
const path = require('path');
let config = {
entry: {
configapp: "./js/main.ts"
},
output: {
path: path.resolve(__dirname, "static/build"),
filename: '[name]-quay-frontend.bundle.js',
},
resolve: {
extensions: [".ts", ".js"],
modules: [
// Allows us to use the top-level node modules
path.resolve(__dirname, '../node_modules'),
2018-06-05 15:26:24 +00:00
path.resolve(__dirname, '../static/css/')
]
},
externals: {
angular: "angular",
jquery: "$",
// moment: "moment",
// "raven-js": "Raven",
},
module: {
rules: [
{
test: /\.ts$/,
use: ["ts-loader"],
exclude: /node_modules/
},
{
test: /\.css$/,
use: [
"style-loader",
"css-loader?minimize=true",
],
},
{
test: /\.html$/,
use: [
'ngtemplate-loader?relativeTo=' + (path.resolve(__dirname)),
'html-loader',
]
},
]
},
plugins: [
// Replace references to global variables with associated modules
new webpack.ProvidePlugin({
FileSaver: 'file-saver',
angular: "angular",
$: "jquery",
// moment: "moment",
}),
],
devtool: "cheap-module-source-map",
};
module.exports = config;