mirror of
https://github.com/digital-asset/daml.git
synced 2024-11-10 10:46:11 +03:00
878429e3bf
copyright update 2020 * update template * run script: `dade-copyright-headers update .` * update script * manual adjustments * exclude frozen proto files from further header checks (by adding NO_AUTO_COPYRIGHT files)
66 lines
1.6 KiB
JavaScript
66 lines
1.6 KiB
JavaScript
// Copyright (c) 2020 The DAML Authors. All rights reserved.
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
const path = require("path");
|
|
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
|
const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin');
|
|
|
|
|
|
module.exports = {
|
|
entry: './src/ui-core/src/devel/index.tsx',
|
|
output: {
|
|
path: path.join(__dirname, 'dist'),
|
|
filename: 'bundle.js',
|
|
publicPath: '/'
|
|
},
|
|
devtool: 'source-map',
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.tsx?$/,
|
|
enforce: 'pre',
|
|
loader: 'tslint-loader',
|
|
options: {
|
|
emitErrors: true,
|
|
}
|
|
},
|
|
{
|
|
test: /\.tsx?$/,
|
|
exclude: /node_modules/,
|
|
loader: 'awesome-typescript-loader',
|
|
},
|
|
{
|
|
test: /\.css$/,
|
|
loader: 'style-loader!css-loader'
|
|
},
|
|
{ test: /\.(png|jpg)$/, loader: 'url-loader?limit=8192' },
|
|
{ test: /\.(woff|woff2)$/, use: {
|
|
loader: 'url-loader',
|
|
options: {
|
|
name: 'fonts/[hash].[ext]',
|
|
limit: 5000,
|
|
mimetype: 'application/font-woff'
|
|
}
|
|
}
|
|
},
|
|
{ test: /\.(ttf|eot|svg)$/, use: {
|
|
loader: 'file-loader',
|
|
options: { name: 'fonts/[hash].[ext]' }
|
|
}
|
|
}
|
|
],
|
|
},
|
|
resolve: {
|
|
extensions: ['.ts', '.tsx', '.js', '.jsx'],
|
|
},
|
|
plugins: [
|
|
new HtmlWebpackPlugin({ template: './src/ui-core/index.html' }),
|
|
new CaseSensitivePathsPlugin(),
|
|
],
|
|
devServer: {
|
|
port: 8001,
|
|
historyApiFallback: { index: '/' },
|
|
compress: true,
|
|
}
|
|
};
|