debian/bullseye
|
Last change
on this file since 1e7f556 was be25db1, checked in by Joachim Langenbach <joachim.langenbach@…>, 8 years ago |
|
Improved adding Water UI in mapservice-webclient
|
-
Property mode
set to
100644
|
|
File size:
1.5 KB
|
| Line | |
|---|
| 1 | const webpack = require('webpack');
|
|---|
| 2 | const HtmlWebpackPlugin = require('html-webpack-plugin');
|
|---|
| 3 | const path = require('path');
|
|---|
| 4 | const CopyPlugin = require('copy-webpack-plugin');
|
|---|
| 5 |
|
|---|
| 6 | module.exports = {
|
|---|
| 7 | entry: './src/main.ts',
|
|---|
| 8 | module: {
|
|---|
| 9 | rules: [
|
|---|
| 10 | {
|
|---|
| 11 | test: /\.ts$/,
|
|---|
| 12 | use: ['ts-loader', 'angular2-template-loader'],
|
|---|
| 13 | exclude: /node_modules/
|
|---|
| 14 | },
|
|---|
| 15 | {
|
|---|
| 16 | test: /\.(html|css)$/,
|
|---|
| 17 | loader: 'raw-loader'
|
|---|
| 18 | },
|
|---|
| 19 | ]
|
|---|
| 20 | },
|
|---|
| 21 | resolve: {
|
|---|
| 22 | extensions: ['.ts', '.js'],
|
|---|
| 23 | alias: {
|
|---|
| 24 | '@': path.resolve(__dirname, 'src/app/'),
|
|---|
| 25 | }
|
|---|
| 26 | },
|
|---|
| 27 | plugins: [
|
|---|
| 28 | new HtmlWebpackPlugin({
|
|---|
| 29 | template: './src/index.html',
|
|---|
| 30 | filename: 'index.html',
|
|---|
| 31 | inject: 'body'
|
|---|
| 32 | }),
|
|---|
| 33 | new webpack.DefinePlugin({
|
|---|
| 34 | // global app config object
|
|---|
| 35 | config: JSON.stringify({
|
|---|
| 36 | apiUrl: 'http://localhost:4000'
|
|---|
| 37 | })
|
|---|
| 38 | }),
|
|---|
| 39 | new CopyPlugin([
|
|---|
| 40 | { from: 'src/css', to: 'css' },
|
|---|
| 41 | { from: '../common/css', to: 'css' },
|
|---|
| 42 | { from: '../common/js', to: 'js' },
|
|---|
| 43 | { from: '../common/lib', to: 'lib' },
|
|---|
| 44 | { from: '../common/resources', to: 'resources' },
|
|---|
| 45 | { from: '../common/icon/gnuboat-256-256-transparent.png', to: 'resources' }
|
|---|
| 46 | ])
|
|---|
| 47 | ],
|
|---|
| 48 | optimization: {
|
|---|
| 49 | splitChunks: {
|
|---|
| 50 | chunks: 'all',
|
|---|
| 51 | },
|
|---|
| 52 | runtimeChunk: true
|
|---|
| 53 | },
|
|---|
| 54 | devServer: {
|
|---|
| 55 | historyApiFallback: true
|
|---|
| 56 | }
|
|---|
| 57 | };
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.