You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 8, 2020. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 8, 2020. It is now read-only.
Still a few things to work out in the integration, but here's what I have so far with .NET and Angular 4. I've started work in this repo (https://github.com/MarkPieszak/aspnetcore-angular2-universal) for now, but imagine it'll get into here soon enough
Reacted by Matthew Steven Monkan, Alexey Gorshkov and Hadi Jami
Reacted by Peter Dobson, Derrick Simpson, Jenli-Chen, zhen, Mucha011, Ilya Stupakov, Alexey Gorshkov and Hadi Jami
Yes so that eventually that'll be set dynamically from the server wth DI, going into Angular, just one of the improvements needed!
URLs must be absolute on the server, previously we patched them for you in Universal.
After upgrading to Ang4 i get this error hile runnign webpack on webpack.config file:
ERROR in [at-loader] ./node_modules/angular2-universal/node_modules/angular2-platform-node/node-platform.d.ts:1:10
TS2305: Module '"C:/Projects/EYC/Solutions/Anticipate/src/Eyc.Solutions.Anticipate.Ui.Web.2/node_modules/@angular/platform-browser/platform-browser"' has no exported member 'AnimationDriver'.
You actually can't just update the current project here to Angular4 my apologies. It takes re shifting and removing a lot a lot of things, pull down that branch I pointed to @skorunka and try to port your app to it.
Honestly though I'd suggest waiting a little bit until it's more cleaned up!
Sure, I'll ping everyone when it's all finished. @bm-software
Yes there's a lot that needs to be updated along with core-js, such as AoT etc.
For now that branch is bare bones but sometime in the next few days I'm hoping I can find a good bunch of hours where I can focus on it and get it into Masters with everyone fixed up in it.
Reacted by timbo, Mucha011, Dmytro Khokhlov, Loetn, Frantisek Skorunka, Adam Amrine, Anton Pankov, zhen, Cassandra Grace, Steve Drake and 1 more
Reacted by Frantisek Skorunka, Adam Amrine, zhen, Andrew Temple and Andrew Stegmaier
Hi, after using polyfills.ts and removing the other references I had, I got
a new error: "Uncaught TypeError: n.replace is not a function
at Ie (vendor.js?v=cF-oRSzI7zKtOJYCqo4-VM3BFrYBGvp2TIrRTJXoo80:453)
at vendor.js?v=cF-oRSzI7zKtOJYCqo4-VM3BFrYBGvp2TIrRTJXoo80:551
at Array.map (<anonymous>)
at t.normalizeStylesheet
(vendor.js?v=cF-oRSzI7zKtOJYCqo4-VM3BFrYBGvp2TIrRTJXoo80:551)
at t.normalizeLoadedTemplate
(vendor.js?v=cF-oRSzI7zKtOJYCqo4-VM3BFrYBGvp2TIrRTJXoo80:551)
at vendor.js?v=cF-oRSzI7zKtOJYCqo4-VM3BFrYBGvp2TIrRTJXoo80:551
at Object.then
(vendor.js?v=cF-oRSzI7zKtOJYCqo4-VM3BFrYBGvp2TIrRTJXoo80:523)
at t.normalizeTemplateOnly
(vendor.js?v=cF-oRSzI7zKtOJYCqo4-VM3BFrYBGvp2TIrRTJXoo80:551)
at t.normalizeTemplate
(vendor.js?v=cF-oRSzI7zKtOJYCqo4-VM3BFrYBGvp2TIrRTJXoo80:551)
at t.loadDirectiveMetadata
(vendor.js?v=cF-oRSzI7zKtOJYCqo4-VM3BFrYBGvp2TIrRTJXoo80:572)
Hi, I looked at your code.. I had tried import 'core-js/client/shim';
before, but my version of core-js must not have shim as i couldn't find a
shim sub-directory.
Thanks,
Colleen
On Mon, Sep 25, 2017 at 4:02 PM, Colleen ***@***.***> wrote:
Hi, I looked at your code.. I had tried import 'core-js/client/shim';
before, but my version of core-js must not have shim as i couldn't find a
shim sub-directory.
Thanks,
Colleen
On Mon, Sep 25, 2017 at 2:51 PM, Ebenezer Monney ***@***.***
>
wrote:
> Take a look at how I implemented it here: https://github.com/emonney/
> QuickApp/blob/master/src/QuickApp/ClientApp/boot.browser.ts
> Using core.js sim.
> The project is based off this repo.
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#800#
issuecomment-331992706>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/
AS0dkp0FMEwP5ZmDp51bMWAiPEoGGUkzks5smARPgaJpZM4Mo5ff>
> .
>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#800 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGDtPf8TvDoRhEX64XEb3ZaTJoxz_9nmks5smAbrgaJpZM4Mo5ff>
.
it seems to build when I publish it.. is there an explicit way to re-build
vendor?
On Mon, Sep 25, 2017 at 3:06 PM, Adam Amrine <notifications@github.com>
wrote:
Have you rebuilt your vendor.js file recently?
On Mon, Sep 25, 2017 at 4:02 PM, Colleen ***@***.***> wrote:
> Hi, I looked at your code.. I had tried import 'core-js/client/shim';
> before, but my version of core-js must not have shim as i couldn't find a
> shim sub-directory.
> Thanks,
> Colleen
>
> On Mon, Sep 25, 2017 at 2:51 PM, Ebenezer Monney <
***@***.***
> >
> wrote:
>
> > Take a look at how I implemented it here: https://github.com/emonney/
> > QuickApp/blob/master/src/QuickApp/ClientApp/boot.browser.ts
> > Using core.js sim.
> > The project is based off this repo.
> >
> > —
> > You are receiving this because you were mentioned.
> > Reply to this email directly, view it on GitHub
> > <#800#
> issuecomment-331992706>,
> > or mute the thread
> > <https://github.com/notifications/unsubscribe-auth/
> AS0dkp0FMEwP5ZmDp51bMWAiPEoGGUkzks5smARPgaJpZM4Mo5ff>
>
> > .
> >
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#800#
issuecomment-331995634>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/
AGDtPf8TvDoRhEX64XEb3ZaTJoxz_9nmks5smAbrgaJpZM4Mo5ff>
> .
>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#800 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AS0dkuICvkAcWJ2mfEjgjQJhAV2lpputks5smAesgaJpZM4Mo5ff>
.
I believe it's `webpack --config webpack.config.vendor.js`. You have to run
it from the command line in the directory that your
webpack.config.vendor.js file is in.
On Mon, Sep 25, 2017 at 4:08 PM, Colleen ***@***.***> wrote:
it seems to build when I publish it.. is there an explicit way to re-build
vendor?
On Mon, Sep 25, 2017 at 3:06 PM, Adam Amrine ***@***.***>
wrote:
> Have you rebuilt your vendor.js file recently?
>
> On Mon, Sep 25, 2017 at 4:02 PM, Colleen ***@***.***>
wrote:
>
> > Hi, I looked at your code.. I had tried import 'core-js/client/shim';
> > before, but my version of core-js must not have shim as i couldn't
find a
> > shim sub-directory.
> > Thanks,
> > Colleen
> >
> > On Mon, Sep 25, 2017 at 2:51 PM, Ebenezer Monney <
> ***@***.***
> > >
> > wrote:
> >
> > > Take a look at how I implemented it here:
https://github.com/emonney/
> > > QuickApp/blob/master/src/QuickApp/ClientApp/boot.browser.ts
> > > Using core.js sim.
> > > The project is based off this repo.
> > >
> > > —
> > > You are receiving this because you were mentioned.
> > > Reply to this email directly, view it on GitHub
> > > <#800#
> > issuecomment-331992706>,
> > > or mute the thread
> > > <https://github.com/notifications/unsubscribe-auth/
> > AS0dkp0FMEwP5ZmDp51bMWAiPEoGGUkzks5smARPgaJpZM4Mo5ff>
> >
> > > .
> > >
> >
> > —
> > You are receiving this because you were mentioned.
> > Reply to this email directly, view it on GitHub
> > <#800#
> issuecomment-331995634>,
> > or mute the thread
> > <https://github.com/notifications/unsubscribe-auth/
> AGDtPf8TvDoRhEX64XEb3ZaTJoxz_9nmks5smAbrgaJpZM4Mo5ff>
>
> > .
> >
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#800#
issuecomment-331996501>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/
AS0dkuICvkAcWJ2mfEjgjQJhAV2lpputks5smAesgaJpZM4Mo5ff>
> .
>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#800 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGDtPbat3sIptVQZuDjsNo27Ykaej3qsks5smAhYgaJpZM4Mo5ff>
.
oh ok.. the application does this when I publish, so i have been building
it by publishing
On Mon, Sep 25, 2017 at 3:13 PM, Adam Amrine <notifications@github.com>
wrote:
I believe it's `webpack --config webpack.config.vendor.js`. You have to run
it from the command line in the directory that your
webpack.config.vendor.js file is in.
On Mon, Sep 25, 2017 at 4:08 PM, Colleen ***@***.***> wrote:
> it seems to build when I publish it.. is there an explicit way to
re-build
> vendor?
>
>
> On Mon, Sep 25, 2017 at 3:06 PM, Adam Amrine ***@***.***>
> wrote:
>
> > Have you rebuilt your vendor.js file recently?
> >
> > On Mon, Sep 25, 2017 at 4:02 PM, Colleen ***@***.***>
> wrote:
> >
> > > Hi, I looked at your code.. I had tried import 'core-js/client/shim';
> > > before, but my version of core-js must not have shim as i couldn't
> find a
> > > shim sub-directory.
> > > Thanks,
> > > Colleen
> > >
> > > On Mon, Sep 25, 2017 at 2:51 PM, Ebenezer Monney <
> > ***@***.***
> > > >
> > > wrote:
> > >
> > > > Take a look at how I implemented it here:
> https://github.com/emonney/
> > > > QuickApp/blob/master/src/QuickApp/ClientApp/boot.browser.ts
> > > > Using core.js sim.
> > > > The project is based off this repo.
> > > >
> > > > —
> > > > You are receiving this because you were mentioned.
> > > > Reply to this email directly, view it on GitHub
> > > > <#800#
> > > issuecomment-331992706>,
> > > > or mute the thread
> > > > <https://github.com/notifications/unsubscribe-auth/
> > > AS0dkp0FMEwP5ZmDp51bMWAiPEoGGUkzks5smARPgaJpZM4Mo5ff>
> > >
> > > > .
> > > >
> > >
> > > —
> > > You are receiving this because you were mentioned.
> > > Reply to this email directly, view it on GitHub
> > > <#800#
> > issuecomment-331995634>,
> > > or mute the thread
> > > <https://github.com/notifications/unsubscribe-auth/
> > AGDtPf8TvDoRhEX64XEb3ZaTJoxz_9nmks5smAbrgaJpZM4Mo5ff>
> >
> > > .
> > >
> >
> > —
> > You are receiving this because you were mentioned.
> > Reply to this email directly, view it on GitHub
> > <#800#
> issuecomment-331996501>,
> > or mute the thread
> > <https://github.com/notifications/unsubscribe-auth/
> AS0dkuICvkAcWJ2mfEjgjQJhAV2lpputks5smAesgaJpZM4Mo5ff>
> > .
> >
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#800#
issuecomment-331997165>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/
AGDtPbat3sIptVQZuDjsNo27Ykaej3qsks5smAhYgaJpZM4Mo5ff>
> .
>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#800 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AS0dkmTZKnfXFwv1JV6SKqUQk0K_-2Grks5smAlWgaJpZM4Mo5ff>
.
ok thanks! I'll look at it and get back tomorrow.
I've been using Chrome primarily but our company still uses IE11. The
ngFors are extremely slow in IE11, so that's why I upgraded to Angular4 and
better polyfills. I'm hoping this will solve the slowness problem. Did
you notice that?
Hi Adam, I tried to match as much as possible and still get the error
below.. is it possible to send me your tsconfig.json, webpack.config.js,
boot-client.ts and boot-server.ts?
thanks,
Colleen
TypeError: n.replace is not a function
at Ie (vendor.js?v=VR6o4twlFeL2-3FmU0tcayQhCR53UZjDReSWrNOnoB0:453)
at vendor.js?v=VR6o4twlFeL2-3FmU0tcayQhCR53UZjDReSWrNOnoB0:551
at Array.map (<anonymous>)
at t.normalizeStylesheet
(vendor.js?v=VR6o4twlFeL2-3FmU0tcayQhCR53UZjDReSWrNOnoB0:551)
at t.normalizeLoadedTemplate
(vendor.js?v=VR6o4twlFeL2-3FmU0tcayQhCR53UZjDReSWrNOnoB0:551)
at vendor.js?v=VR6o4twlFeL2-3FmU0tcayQhCR53UZjDReSWrNOnoB0:551
at Object.then
(vendor.js?v=VR6o4twlFeL2-3FmU0tcayQhCR53UZjDReSWrNOnoB0:523)
at t.normalizeTemplateOnly
(vendor.js?v=VR6o4twlFeL2-3FmU0tcayQhCR53UZjDReSWrNOnoB0:551)
at t.normalizeTemplate
(vendor.js?v=VR6o4twlFeL2-3FmU0tcayQhCR53UZjDReSWrNOnoB0:551)
at t.loadDirectiveMetadata
import './polyfills/polyfills.ts';
import { enableProdMode } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './app/app.module';
const rootElemTagName = 'app'; // Update this if you change your root component selector
// Enable either Hot Module Reloading or production mode
if (module['hot']) {
module['hot'].accept();
module['hot'].dispose(() => {
// Before restarting the app, we create a new root element and dispose the old one
const oldRootElem = document.querySelector(rootElemTagName);
const newRootElem = document.createElement(rootElemTagName);
oldRootElem.parentNode.insertBefore(newRootElem, oldRootElem);
platform.destroy();
});
} else {
enableProdMode();
}
// Boot the application, either now or when the DOM content is loaded
const platform = platformBrowserDynamic();
const bootApplication = () => { platform.bootstrapModule(AppModule); };
if (document.readyState === 'complete') {
bootApplication();
} else {
document.addEventListener('DOMContentLoaded', bootApplication);
}
webpack.config.js
const path = require('path');
const webpack = require('webpack');
const merge = require('webpack-merge');
const CheckerPlugin = require('awesome-typescript-loader').CheckerPlugin;
module.exports = (env) => {
// Configuration in common to both client-side and server-side bundles
const isDevBuild = !(env && env.prod);
const sharedConfig = {
stats: { modules: false },
context: __dirname,
resolve: { extensions: ['.js', '.ts'] },
output: {
filename: '[name].js',
publicPath: '/dist/' // Webpack dev middleware, if enabled, handles requests for this URL prefix
},
module: {
rules: [
{ test: /\.ts$/, include: /ClientApp/, use: ['awesome-typescript-loader?silent=true', 'angular2-template-loader'] },
{ test: /\.html$/, use: 'html-loader?minimize=false' },
{ test: /\.css$/, use: ['to-string-loader', 'css-loader'] },
{ test: /\.(png|jpg|jpeg|gif|svg)$/, use: 'url-loader?limit=25000' }
]
},
plugins: [new CheckerPlugin()]
};
// Configuration for client-side bundle suitable for running in browsers
const clientBundleOutputDir = './wwwroot/dist';
const clientBundleConfig = merge(sharedConfig, {
entry: { 'main-client': './ClientApp/boot-client.ts' },
output: { path: path.join(__dirname, clientBundleOutputDir) },
plugins: [
new webpack.DllReferencePlugin({
context: __dirname,
manifest: require('./wwwroot/dist/vendor-manifest.json')
})
].concat(isDevBuild ? [
// Plugins that apply in development builds only
new webpack.SourceMapDevToolPlugin({
filename: '[file].map', // Remove this line if you prefer inline source maps
moduleFilenameTemplate: path.relative(clientBundleOutputDir, '[resourcePath]') // Point sourcemap entries to the original file locations on disk
})
] : [
// Plugins that apply in production builds only
new webpack.optimize.UglifyJsPlugin()
])
});
return [clientBundleConfig];
};
We don't have a boot-server.ts because we removed server side rendering. You may also notice that some of these files have the pieces removed from them that are required for server side rendering. You should be able to disable SSR to see if that is part of the issue.
On Tue, Sep 26, 2017 at 10:53 AM, Adam Amrine ***@***.***> wrote:
tsconfig.json:
{
"compilerOptions": {
"moduleResolution": "node",
"target": "es5",
"sourceMap": true,
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"skipDefaultLibCheck": true,
"lib": [ "es6", "dom" ],
"types": [ "node" ]
},
"exclude": [ "bin", "node_modules" ],
"atom": { "rewriteTsconfig": false }
}
boot-client.ts
import './polyfills/polyfills.ts';
import { enableProdMode } from ***@***.***/core';
import { platformBrowserDynamic } from ***@***.***/platform-browser-dynamic';
import { AppModule } from './app/app.module';
const rootElemTagName = 'app'; // Update this if you change your root component selector
// Enable either Hot Module Reloading or production mode
if (module['hot']) {
module['hot'].accept();
module['hot'].dispose(() => {
// Before restarting the app, we create a new root element and dispose the old one
const oldRootElem = document.querySelector(rootElemTagName);
const newRootElem = document.createElement(rootElemTagName);
oldRootElem.parentNode.insertBefore(newRootElem, oldRootElem);
platform.destroy();
});
} else {
enableProdMode();
}
// Boot the application, either now or when the DOM content is loaded
const platform = platformBrowserDynamic();
const bootApplication = () => { platform.bootstrapModule(AppModule); };
if (document.readyState === 'complete') {
bootApplication();
} else {
document.addEventListener('DOMContentLoaded', bootApplication);
}
webpack.config.js
const path = require('path');
const webpack = require('webpack');
const merge = require('webpack-merge');
const CheckerPlugin = require('awesome-typescript-loader').CheckerPlugin;
module.exports = (env) => {
// Configuration in common to both client-side and server-side bundles
const isDevBuild = !(env && env.prod);
const sharedConfig = {
stats: { modules: false },
context: __dirname,
resolve: { extensions: ['.js', '.ts'] },
output: {
filename: '[name].js',
publicPath: '/dist/' // Webpack dev middleware, if enabled, handles requests for this URL prefix
},
module: {
rules: [
{ test: /\.ts$/, include: /ClientApp/, use: ['awesome-typescript-loader?silent=true', 'angular2-template-loader'] },
{ test: /\.html$/, use: 'html-loader?minimize=false' },
{ test: /\.css$/, use: ['to-string-loader', 'css-loader'] },
{ test: /\.(png|jpg|jpeg|gif|svg)$/, use: 'url-loader?limit=25000' }
]
},
plugins: [new CheckerPlugin()]
};
// Configuration for client-side bundle suitable for running in browsers
const clientBundleOutputDir = './wwwroot/dist';
const clientBundleConfig = merge(sharedConfig, {
entry: { 'main-client': './ClientApp/boot-client.ts' },
output: { path: path.join(__dirname, clientBundleOutputDir) },
plugins: [
new webpack.DllReferencePlugin({
context: __dirname,
manifest: require('./wwwroot/dist/vendor-manifest.json')
})
].concat(isDevBuild ? [
// Plugins that apply in development builds only
new webpack.SourceMapDevToolPlugin({
filename: '[file].map', // Remove this line if you prefer inline source maps
moduleFilenameTemplate: path.relative(clientBundleOutputDir, '[resourcePath]') // Point sourcemap entries to the original file locations on disk
})
] : [
// Plugins that apply in production builds only
new webpack.optimize.UglifyJsPlugin()
])
});
return [clientBundleConfig];
};
We don't have a boot-server.ts because we removed server side rendering.
You may also notice that some of these files have the pieces removed from
them that are required for server side rendering. You should be able to
disable SSR to see if that is part of the issue.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#800 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AS0dkjr6LEADfmgQcu86yJ9Oywc02Luoks5smR3qgaJpZM4Mo5ff>
.
On Tue, Sep 26, 2017 at 12:11 PM, Colleen ***@***.***> wrote:
thanks.. is awesome-typescript-loader part of npm or your own library? can
i use ts-loader instead?
On Tue, Sep 26, 2017 at 10:53 AM, Adam Amrine ***@***.***>
wrote:
> tsconfig.json:
>
> {
> "compilerOptions": {
> "moduleResolution": "node",
> "target": "es5",
> "sourceMap": true,
> "experimentalDecorators": true,
> "emitDecoratorMetadata": true,
> "skipDefaultLibCheck": true,
> "lib": [ "es6", "dom" ],
> "types": [ "node" ]
> },
> "exclude": [ "bin", "node_modules" ],
> "atom": { "rewriteTsconfig": false }
> }
>
> boot-client.ts
>
> import './polyfills/polyfills.ts';
> import { enableProdMode } from ***@***.***/core';
> import { platformBrowserDynamic } from ***@***.***/platform-browser-
dynamic';
> import { AppModule } from './app/app.module';
> const rootElemTagName = 'app'; // Update this if you change your root
component selector
>
> // Enable either Hot Module Reloading or production mode
> if (module['hot']) {
> module['hot'].accept();
> module['hot'].dispose(() => {
> // Before restarting the app, we create a new root element and dispose
the old one
> const oldRootElem = document.querySelector(rootElemTagName);
> const newRootElem = document.createElement(rootElemTagName);
> oldRootElem.parentNode.insertBefore(newRootElem, oldRootElem);
> platform.destroy();
> });
> } else {
> enableProdMode();
> }
>
> // Boot the application, either now or when the DOM content is loaded
> const platform = platformBrowserDynamic();
>
> const bootApplication = () => { platform.bootstrapModule(AppModule); };
> if (document.readyState === 'complete') {
> bootApplication();
> } else {
> document.addEventListener('DOMContentLoaded', bootApplication);
> }
>
> webpack.config.js
>
> const path = require('path');
> const webpack = require('webpack');
> const merge = require('webpack-merge');
> const CheckerPlugin = require('awesome-typescript-
loader').CheckerPlugin;
>
> module.exports = (env) => {
> // Configuration in common to both client-side and server-side bundles
> const isDevBuild = !(env && env.prod);
> const sharedConfig = {
> stats: { modules: false },
> context: __dirname,
> resolve: { extensions: ['.js', '.ts'] },
> output: {
> filename: '[name].js',
> publicPath: '/dist/' // Webpack dev middleware, if enabled, handles
requests for this URL prefix
> },
> module: {
> rules: [
> { test: /\.ts$/, include: /ClientApp/, use: ['awesome-typescript-loader?silent=true',
'angular2-template-loader'] },
> { test: /\.html$/, use: 'html-loader?minimize=false' },
> { test: /\.css$/, use: ['to-string-loader', 'css-loader'] },
> { test: /\.(png|jpg|jpeg|gif|svg)$/, use: 'url-loader?limit=25000' }
> ]
> },
> plugins: [new CheckerPlugin()]
> };
>
> // Configuration for client-side bundle suitable for running in browsers
> const clientBundleOutputDir = './wwwroot/dist';
> const clientBundleConfig = merge(sharedConfig, {
> entry: { 'main-client': './ClientApp/boot-client.ts' },
> output: { path: path.join(__dirname, clientBundleOutputDir) },
> plugins: [
> new webpack.DllReferencePlugin({
> context: __dirname,
> manifest: require('./wwwroot/dist/vendor-manifest.json')
> })
> ].concat(isDevBuild ? [
> // Plugins that apply in development builds only
> new webpack.SourceMapDevToolPlugin({
> filename: '[file].map', // Remove this line if you prefer inline source
maps
> moduleFilenameTemplate: path.relative(clientBundleOutputDir,
'[resourcePath]') // Point sourcemap entries to the original file locations
on disk
> })
> ] : [
> // Plugins that apply in production builds only
> new webpack.optimize.UglifyJsPlugin()
> ])
> });
>
> return [clientBundleConfig];
> };
>
>
> We don't have a boot-server.ts because we removed server side rendering.
> You may also notice that some of these files have the pieces removed from
> them that are required for server side rendering. You should be able to
> disable SSR to see if that is part of the issue.
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#800#
issuecomment-332244164>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/
AS0dkjr6LEADfmgQcu86yJ9Oywc02Luoks5smR3qgaJpZM4Mo5ff>
> .
>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#800 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGDtPfkIrBB2V417J3usbG9axzWXHUQrks5smSEigaJpZM4Mo5ff>
.
Thank you so much for your help.. it worked after I got rid of the
server-side rendering code... it hangs up locally, but it works on our dev
server after publish.
thanks,
Colleen
On Tue, Sep 26, 2017 at 12:30 PM, Adam Amrine <notifications@github.com>
wrote:
It would have come from npm. I'm not sure if ts-loader will work. That is
what it was using when I pulled down the sample app and I didn't change it.
On Tue, Sep 26, 2017 at 12:11 PM, Colleen ***@***.***>
wrote:
> thanks.. is awesome-typescript-loader part of npm or your own library?
can
> i use ts-loader instead?
>
> On Tue, Sep 26, 2017 at 10:53 AM, Adam Amrine ***@***.***>
> wrote:
>
> > tsconfig.json:
> >
> > {
> > "compilerOptions": {
> > "moduleResolution": "node",
> > "target": "es5",
> > "sourceMap": true,
> > "experimentalDecorators": true,
> > "emitDecoratorMetadata": true,
> > "skipDefaultLibCheck": true,
> > "lib": [ "es6", "dom" ],
> > "types": [ "node" ]
> > },
> > "exclude": [ "bin", "node_modules" ],
> > "atom": { "rewriteTsconfig": false }
> > }
> >
> > boot-client.ts
> >
> > import './polyfills/polyfills.ts';
> > import { enableProdMode } from ***@***.***/core';
> > import { platformBrowserDynamic } from ***@***.***/platform-browser-
> dynamic';
> > import { AppModule } from './app/app.module';
> > const rootElemTagName = 'app'; // Update this if you change your root
> component selector
> >
> > // Enable either Hot Module Reloading or production mode
> > if (module['hot']) {
> > module['hot'].accept();
> > module['hot'].dispose(() => {
> > // Before restarting the app, we create a new root element and dispose
> the old one
> > const oldRootElem = document.querySelector(rootElemTagName);
> > const newRootElem = document.createElement(rootElemTagName);
> > oldRootElem.parentNode.insertBefore(newRootElem, oldRootElem);
> > platform.destroy();
> > });
> > } else {
> > enableProdMode();
> > }
> >
> > // Boot the application, either now or when the DOM content is loaded
> > const platform = platformBrowserDynamic();
> >
> > const bootApplication = () => { platform.bootstrapModule(AppModule);
};
> > if (document.readyState === 'complete') {
> > bootApplication();
> > } else {
> > document.addEventListener('DOMContentLoaded', bootApplication);
> > }
> >
> > webpack.config.js
> >
> > const path = require('path');
> > const webpack = require('webpack');
> > const merge = require('webpack-merge');
> > const CheckerPlugin = require('awesome-typescript-
> loader').CheckerPlugin;
> >
> > module.exports = (env) => {
> > // Configuration in common to both client-side and server-side bundles
> > const isDevBuild = !(env && env.prod);
> > const sharedConfig = {
> > stats: { modules: false },
> > context: __dirname,
> > resolve: { extensions: ['.js', '.ts'] },
> > output: {
> > filename: '[name].js',
> > publicPath: '/dist/' // Webpack dev middleware, if enabled, handles
> requests for this URL prefix
> > },
> > module: {
> > rules: [
> > { test: /\.ts$/, include: /ClientApp/, use:
['awesome-typescript-loader?silent=true',
> 'angular2-template-loader'] },
> > { test: /\.html$/, use: 'html-loader?minimize=false' },
> > { test: /\.css$/, use: ['to-string-loader', 'css-loader'] },
> > { test: /\.(png|jpg|jpeg|gif|svg)$/, use: 'url-loader?limit=25000' }
> > ]
> > },
> > plugins: [new CheckerPlugin()]
> > };
> >
> > // Configuration for client-side bundle suitable for running in
browsers
> > const clientBundleOutputDir = './wwwroot/dist';
> > const clientBundleConfig = merge(sharedConfig, {
> > entry: { 'main-client': './ClientApp/boot-client.ts' },
> > output: { path: path.join(__dirname, clientBundleOutputDir) },
> > plugins: [
> > new webpack.DllReferencePlugin({
> > context: __dirname,
> > manifest: require('./wwwroot/dist/vendor-manifest.json')
> > })
> > ].concat(isDevBuild ? [
> > // Plugins that apply in development builds only
> > new webpack.SourceMapDevToolPlugin({
> > filename: '[file].map', // Remove this line if you prefer inline source
> maps
> > moduleFilenameTemplate: path.relative(clientBundleOutputDir,
> '[resourcePath]') // Point sourcemap entries to the original file
locations
> on disk
> > })
> > ] : [
> > // Plugins that apply in production builds only
> > new webpack.optimize.UglifyJsPlugin()
> > ])
> > });
> >
> > return [clientBundleConfig];
> > };
> >
> >
> > We don't have a boot-server.ts because we removed server side
rendering.
> > You may also notice that some of these files have the pieces removed
from
> > them that are required for server side rendering. You should be able to
> > disable SSR to see if that is part of the issue.
> >
> > —
> > You are receiving this because you were mentioned.
> > Reply to this email directly, view it on GitHub
> > <#800#
> issuecomment-332244164>,
> > or mute the thread
> > <https://github.com/notifications/unsubscribe-auth/
> AS0dkjr6LEADfmgQcu86yJ9Oywc02Luoks5smR3qgaJpZM4Mo5ff>
>
> > .
> >
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#800#
issuecomment-332248895>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/
AGDtPfkIrBB2V417J3usbG9axzWXHUQrks5smSEigaJpZM4Mo5ff>
> .
>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#800 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AS0dkg7QqzesA5Da5ATbpKiRT-vUeTJeks5smTSxgaJpZM4Mo5ff>
.
Activity
MarkPieszak commentedon Mar 25, 2017
Still a few things to work out in the integration, but here's what I have so far with .NET and Angular 4. I've started work in this repo (https://github.com/MarkPieszak/aspnetcore-angular2-universal) for now, but imagine it'll get into here soon enough
MarkPieszak commentedon Mar 25, 2017
Yeah it's quite a bit more, also starting the process differently (now in the Controller) so that we can give .NET the other essential SEO data.
Of course, if you don't care about server rendering, you can just shut it off and update to 4.0 real easily :)
peterdobson commentedon Mar 25, 2017
Fantastic! Just had to change the port number in fetchdata.components.ts from http://localhost:5000/api/test/users to http://localhost:1780/api/test/users to get the fetch-data sample working.
MarkPieszak commentedon Mar 25, 2017
Yes so that eventually that'll be set dynamically from the server wth DI, going into Angular, just one of the improvements needed!
URLs must be absolute on the server, previously we patched them for you in Universal.
skorunka commentedon Mar 25, 2017
After upgrading to Ang4 i get this error hile runnign webpack on webpack.config file:
Any idea? Than kyou.
MarkPieszak commentedon Mar 25, 2017
You actually can't just update the current project here to Angular4 my apologies. It takes re shifting and removing a lot a lot of things, pull down that branch I pointed to @skorunka and try to port your app to it.
Honestly though I'd suggest waiting a little bit until it's more cleaned up!
skorunka commentedon Mar 27, 2017
@MarkPieszak No worries, I understand. Thank you for advice, i will give it a try.
seven1986 commentedon Mar 28, 2017
AOT
@starquake , sorry.
AOT = ahead-of-time https://angular.cn/docs/ts/latest/guide/glossary.html
We all expect officially asp net core angular upgrade to 4.0!
starquake commentedon Mar 28, 2017
@seven1986 I'm sorry, what does 'AOT' mean?
michelebombardi commentedon Mar 28, 2017
@MarkPieszak Will you let us know here when you've done?
ns8482e commentedon Mar 28, 2017
@MarkPieszak For angular 4 branch you pointed is still using es6-shim. Is there any plan to update it to core-js?
MarkPieszak commentedon Mar 28, 2017
Sure, I'll ping everyone when it's all finished. @bm-software
Yes there's a lot that needs to be updated along with core-js, such as AoT etc.
For now that branch is bare bones but sometime in the next few days I'm hoping I can find a good bunch of hours where I can focus on it and get it into Masters with everyone fixed up in it.
skorunka commentedon Mar 29, 2017
@MarkPieszak You are our hero!
62 remaining items
cbcolleenb commentedon Sep 25, 2017
cbcolleenb commentedon Sep 25, 2017
AmrineA commentedon Sep 25, 2017
cbcolleenb commentedon Sep 25, 2017
AmrineA commentedon Sep 25, 2017
cbcolleenb commentedon Sep 25, 2017
AmrineA commentedon Sep 25, 2017
I'm not sure if this helps, but here is my package.json. I wouldn't copy it verbatim or you'll get stuff you don't need and remove things you do.
Here is my webpack.config.vendor.js:
Is there a specific browser you're using? Have you tried other browsers?
cbcolleenb commentedon Sep 25, 2017
cbcolleenb commentedon Sep 25, 2017
k-krupka commentedon Sep 25, 2017
cbcolleenb commentedon Sep 26, 2017
AmrineA commentedon Sep 26, 2017
tsconfig.json:
boot-client.ts
webpack.config.js
We don't have a boot-server.ts because we removed server side rendering. You may also notice that some of these files have the pieces removed from them that are required for server side rendering. You should be able to disable SSR to see if that is part of the issue.
cbcolleenb commentedon Sep 26, 2017
AmrineA commentedon Sep 26, 2017
cbcolleenb commentedon Sep 27, 2017