This repository has been archived by the owner on Oct 14, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 683
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "build: remove webpack process and replace with tsc (#626)"
This reverts commit 7d59edf.
- Loading branch information
1 parent
91b1201
commit ac849ac
Showing
5 changed files
with
247 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
// Work around for https://github.com/angular/angular-cli/issues/7200 | ||
|
||
const path = require('path'); | ||
const webpack = require('webpack'); | ||
|
||
module.exports = { | ||
mode: 'none', | ||
entry: { | ||
// This is our Express server for Dynamic universal | ||
server: './server.ts', | ||
// This is an example of Static prerendering (generative) | ||
prerender: './prerender.ts' | ||
}, | ||
target: 'node', | ||
resolve: { extensions: ['.ts', '.js'] }, | ||
optimization: { | ||
minimize: false | ||
}, | ||
output: { | ||
// Puts the output at the root of the dist folder | ||
path: path.join(__dirname, 'dist'), | ||
filename: '[name].js' | ||
}, | ||
module: { | ||
rules: [ | ||
{ test: /\.ts$/, loader: 'ts-loader' }, | ||
{ | ||
// Mark files inside `@angular/core` as using SystemJS style dynamic imports. | ||
// Removing this will cause deprecation warnings to appear. | ||
test: /(\\|\/)@angular(\\|\/)core(\\|\/).+\.js$/, | ||
parser: { system: true }, | ||
}, | ||
] | ||
}, | ||
plugins: [ | ||
new webpack.ContextReplacementPlugin( | ||
// fixes WARNING Critical dependency: the request of a dependency is an expression | ||
/(.+)?angular(\\|\/)core(.+)?/, | ||
path.join(__dirname, 'src'), // location of your src | ||
{} // a map of your routes | ||
), | ||
new webpack.ContextReplacementPlugin( | ||
// fixes WARNING Critical dependency: the request of a dependency is an expression | ||
/(.+)?express(\\|\/)(.+)?/, | ||
path.join(__dirname, 'src'), | ||
{} | ||
) | ||
] | ||
} |
Oops, something went wrong.