Skip to content

Commit 809d59f

Browse files
authored
Work around an issue with Webpack and Angular 1.8.x that caused the UI to not load correctly (#879)
1 parent 83cb37e commit 809d59f

File tree

5 files changed

+22
-4
lines changed

5 files changed

+22
-4
lines changed

CHANGES.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ Changes for CrateDB Admin Interface
55
Unreleased
66
==========
77

8+
- Worked around an issue with Webpack and Angular 1.8.x that caused the
9+
Admin UI to not load correctly.
10+
811

912
2024-10-28 1.24.8
1013
=================

DEVELOP.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,19 @@ After the application has been compiled and the Webpack development server has
4141
started, the process should automatically open a browser tab.
4242

4343

44+
Working with production builds locally
45+
======================================
46+
47+
You need to build for production::
48+
49+
npm run build
50+
51+
Then, you can start a local server to serve the production build::
52+
53+
npm run serve
54+
55+
This will start a server on ``http://localhost:8000/``.
56+
4457
Description
4558
===========
4659

app/app.module.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,9 @@ $.get('static/conf/plugins.json', function (plugins) {
149149
}
150150
]);
151151

152-
appModule.config(function($sceDelegateProvider) {
152+
appModule.config(['$sceDelegateProvider', function($sceDelegateProvider) {
153153
$sceDelegateProvider.resourceUrlWhitelist(['**']);
154-
});
154+
}]);
155155
// Configuration of i18n Internationalization
156156
appModule.config(['$translateProvider', '$translatePartialLoaderProvider',
157157
function ($translateProvider, $translatePartialLoaderProvider) {

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@
7676
"cratedb": "docker run -it --rm --publish 4200:4200 crate/crate:nightly -Chttp.cors.enabled=true -Chttp.cors.allow-origin=*",
7777
"develop": "webpack serve --progress --config=webpack.dev.config.js --open-target=http://localhost:9000/?base_uri=http://localhost:4200#!/",
7878
"build": "webpack --config webpack.prod.config.js --progress",
79+
"serve": "cd build && python3 -m http.server",
7980
"test": "karma start"
8081
}
8182
}

webpack.prod.config.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ module.exports = {
1818
filename: 'static/libs/[name].bundle.js',
1919
path: path.resolve(__dirname, 'build')
2020
},
21-
optimization: {
22-
runtimeChunk: 'single'
21+
optimization: {
22+
runtimeChunk: 'single',
23+
minimize: false,
2324
},
2425
plugins: [
2526
new CleanWebpackPlugin(),

0 commit comments

Comments
 (0)