Answer the question
In order to leave comments, you need to log in
Is it possible for a single js/json not to be bundled and minified, but just placed next to the bundle in the dist folder?
For example, in the build folder there will be a config folder
. And in this folder there will be my environments.json file without minification
Answer the question
In order to leave comments, you need to log in
add a file to assets
https://angular.io/guide/workspace-config#assets-c...
To prevent webpack from including it in the bundle, add a link to the script directly in index.html as <script src="..."></script>
In the application, do not import, but use from the global scope.
The second option is to use webpack's dynamic import.
Write
import('./mymodule').then(module => {
// тут используем модуль
});
import(/* webpackChunkName: "myname" */'./mymodule')
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question