jQWidgets Forums
Forum Replies Created
Viewing 3 posts - 1 through 3 (of 3 total)
-
Author
-
March 5, 2017 at 3:57 pm in reply to: VS 2017 + ASP.NET + Angular 2 VS 2017 + ASP.NET + Angular 2 #92069
Thank you
It works now.
For somebody else in the future.My changes:
module: { rules: [ { test: /\.ts$/, include: /ClientApp/, use: [ 'awesome-typescript-loader?silent=true', 'angular2-template-loader'] },
==>
module: { rules: [ { test: /\.ts$/, include: [/node_modules.jqwidgets-framework/,/ClientApp/], use:['awesome-typescript-loader?silent=true','angular2-template-loader'] },
March 5, 2017 at 1:17 am in reply to: VS 2017 + ASP.NET + Angular 2 VS 2017 + ASP.NET + Angular 2 #92063Forum link does not work.
Here is link to ty test project:
“https://1drv.ms/u/s!Ak3PPyEXKEwJhziqD7rndWvUUX9b”March 5, 2017 at 1:13 am in reply to: VS 2017 + ASP.NET + Angular 2 VS 2017 + ASP.NET + Angular 2 #92062I could not make it work.
Here is my test project:
Here is my 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() ]) }); // Configuration for server-side (prerendering) bundle suitable for running in Node const serverBundleConfig = merge(sharedConfig, { resolve: { mainFields: ['main'] }, entry: { 'main-server': './ClientApp/boot-server.ts' }, plugins: [ new webpack.DllReferencePlugin({ context: __dirname, manifest: require('./ClientApp/dist/vendor-manifest.json'), sourceType: 'commonjs2', name: './vendor' }) ], output: { libraryTarget: 'commonjs', path: path.join(__dirname, './ClientApp/dist') }, target: 'node', devtool: 'inline-source-map' }); return [clientBundleConfig, serverBundleConfig]; };
Thank you
-
AuthorPosts
Viewing 3 posts - 1 through 3 (of 3 total)