Skip to content

Commit

Permalink
Work around an issue with Webpack and Angular 1.8.x that caused the U…
Browse files Browse the repository at this point in the history
…I to not load correctly (#879)
  • Loading branch information
kneth authored Nov 20, 2024
1 parent 83cb37e commit 809d59f
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ Changes for CrateDB Admin Interface
Unreleased
==========

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


2024-10-28 1.24.8
=================
Expand Down
13 changes: 13 additions & 0 deletions DEVELOP.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,19 @@ After the application has been compiled and the Webpack development server has
started, the process should automatically open a browser tab.


Working with production builds locally
======================================

You need to build for production::

npm run build

Then, you can start a local server to serve the production build::

npm run serve

This will start a server on ``http://localhost:8000/``.

Description
===========

Expand Down
4 changes: 2 additions & 2 deletions app/app.module.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,9 @@ $.get('static/conf/plugins.json', function (plugins) {
}
]);

appModule.config(function($sceDelegateProvider) {
appModule.config(['$sceDelegateProvider', function($sceDelegateProvider) {
$sceDelegateProvider.resourceUrlWhitelist(['**']);
});
}]);
// Configuration of i18n Internationalization
appModule.config(['$translateProvider', '$translatePartialLoaderProvider',
function ($translateProvider, $translatePartialLoaderProvider) {
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
"cratedb": "docker run -it --rm --publish 4200:4200 crate/crate:nightly -Chttp.cors.enabled=true -Chttp.cors.allow-origin=*",
"develop": "webpack serve --progress --config=webpack.dev.config.js --open-target=http://localhost:9000/?base_uri=http://localhost:4200#!/",
"build": "webpack --config webpack.prod.config.js --progress",
"serve": "cd build && python3 -m http.server",
"test": "karma start"
}
}
5 changes: 3 additions & 2 deletions webpack.prod.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ module.exports = {
filename: 'static/libs/[name].bundle.js',
path: path.resolve(__dirname, 'build')
},
optimization: {
runtimeChunk: 'single'
optimization: {
runtimeChunk: 'single',
minimize: false,
},
plugins: [
new CleanWebpackPlugin(),
Expand Down

0 comments on commit 809d59f

Please sign in to comment.