Closed iliesaithamouda closed 4 years ago
Could you post your webpack configuration? I'll admit I'm not specifically familiar with the angular CLI tools but if I can see your configuration that may help.
yes for sure.
here's my only webpack conf :
const CopyModulesPlugin = require('copy-modules-webpack-plugin');
module.exports = {
plugins: [
new CopyModulesPlugin({
destination: 'webpack-modules'
})
]
};
here's my angular.json :
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"or-angular": {
"root": "",
"sourceRoot": "src",
"projectType": "application",
"prefix": "app",
"schematics": {
"@ngrx/schematics:action": {
"creators": true
},
"@ngrx/schematics:effect": {
"creators": true
},
"@ngrx/schematics:reducer": {
"creators": true
}
},
"architect": {
"test": {
"builder": "@angular-builders/jest:run",
"options": {
"no-cache": true
}
},
"build": {
"builder": "@angular-builders/custom-webpack:browser",
"options": {
"es5BrowserSupport": true,
"outputPath": "dist",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.app.json",
"assets": [
"src/favicon.ico",
"src/assets",
"src/assets/**/*.svg",
"src/assets/mocks/**/*.html"
],
"scripts": [],
"styles": [
"src/app/_fonts.scss",
"src/styles.scss"
],
"stylePreprocessorOptions": {
"includePaths": [
"src/app/core/style",
"src/app/"
]
},
"customWebpackConfig": {
"path": "./webpack.config.js"
}
},
"configurations": {
"production": {
"deployUrl": "/etc/clientlibs/AppRoot/js/",
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true
}
}
},
"serve": {
"builder": "@angular-builders/custom-webpack:dev-server",
"options": {
"browserTarget": "or-angular:build",
"proxyConfig": "proxy.conf.js",
"customWebpackConfig": {
"path": "./webpack.config.js"
}
},
"configurations": {
"production": {
"browserTarget": "or-angular:build:production"
}
}
}
}
}
},
"defaultProject": "or-angular"
}
the only webpack conf that i have is the one as suggested in the readMe.md of this repo
Hi @iliesaithamouda, please see if the new version 2.1.1 of the plugin helps your case.
Hi @rpokorny , yes now it's working. thank you for fixing the issue 👍
I am trying to "ng build -c dev" an angular project with the plugin. The build fail when it start the copy-modules-webpack-plugin with an error like this:
Build with AOT angular project
Don't know why or how yet... still looking. If anyone can help 😃