Closed smasithick closed 5 years ago
I am trying this github project right now, but I think you have to take a look at #1 there you can resolve the ngFactory.
Hi, sorry for the delay I was super busy those last days. You can have a look at the repository again. I have just pushed some updates. Basically, this is what missed you:
{
test: /\.(scss|sass)$/,
use: [
{ loader: 'style-loader', options: { sourceMap: isDev } },
{ loader: 'css-loader', options: { sourceMap: isDev } },
{ loader: 'sass-loader', options: { sourceMap: isDev } }
],
include: helpers.root('src', 'assets')
}
@samteb If I use
npm run build:dev
, scss, img and font files in src/assets folder are not included in the webpack build dist folder. Only the css files under src folder are included.I've below imports in src/assets/scss/board.scss file
These are not included. Hence, my app looks like a plain html without any scss applied.
If I use,
npm run serve
, I'm getting below error in chrome consoleRefused to execute inline script because it violates the following Content Security Policy directive: "default-src 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-KpHv3zgivMSB4dPnfYfqMt2lBibsYvM36EdoBBAsfbM='), or a nonce ('nonce-...') is required to enable inline execution. Note also that 'script-src' was not explicitly set, so 'default-src' is used as a fallback.
Refused to load the font '<URL>' because it violates the following Content Security Policy directive: "default-src 'self'". Note that 'font-src' was not explicitly set, so 'default-src' is used as a fallback.
If I use,
npm run webpack-prod
, I'm getting below errorERROR in src/main.aot.ts(4,36): error TS2307: Cannot find module './app/app.module.ngfactory'.
Please find the module rules from webpack.config.common.js
Also, I've angular.json file generated by angular-cli. Even If I remove this file, I'm facing the same issue.
Your help will be appreciated.