I'm moving from webpack to angular-cli and I need it to resolve minified js files. In webpack you'd add extensions: ['', '.ts', '.js', 'min.js', '.json'] to webpack.config. What is the equivalent in angular-cli?
1 Answer
At the moment Angular CLI only supports loading .js and .ts files, as shown here.
You might have luck adding the path of the file to the scripts property of the angular-cli.json file (added in recent version before beta-16, not sure which one).
Apart from that, extending Webpack config is planned, but has no ETA, as the team hasn't worked on a suitable design for it yet.
1 Comment
Wilhelmina Lohan
Thank you. I didn't try the
scripts property but I found a solution of renaming the *.min.js files to *.js to get angular-cli's webpack to resolve them with minimal change to my projects structure.
node_modules/wijmo. The amd files are the *min.js files in question. I found a solution of renaming the *.min.js files to *.js to get angular-cli's webpack to resolve them.