Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 365b2c5

Browse filesBrowse files
DanHarmanSteveSandersonMS
authored andcommitted
Added babel-loader caching to improve subsequent build times. (aspnet#777)
1 parent efcfc0b commit 365b2c5
Copy full SHA for 365b2c5

File tree

Expand file treeCollapse file tree

2 files changed

+6
-6
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+6
-6
lines changed
Open diff view settings
Collapse file

‎templates/ReactReduxSpa/webpack.config.js‎

Copy file name to clipboardExpand all lines: templates/ReactReduxSpa/webpack.config.js
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ module.exports = (env) => {
1010
// Configuration in common to both client-side and server-side bundles
1111
const sharedConfig = () => ({
1212
stats: { modules: false },
13-
resolve: { extensions: [ '.js', '.jsx', '.ts', '.tsx' ] },
13+
resolve: { extensions: ['.js', '.jsx', '.ts', '.tsx'] },
1414
output: {
1515
filename: '[name].js',
1616
publicPath: '/dist/' // Webpack dev middleware, if enabled, handles requests for this URL prefix
1717
},
1818
module: {
1919
rules: [
20-
{ test: /\.tsx?$/, include: /ClientApp/, use: 'babel-loader' },
20+
{ test: /\.tsx?$/, include: /ClientApp/, use: { loader: 'babel-loader', options: { cacheDirectory: true } } },
2121
{ test: /\.tsx?$/, include: /ClientApp/, use: 'awesome-typescript-loader?silent=true' }
2222
]
2323
},
@@ -74,4 +74,4 @@ module.exports = (env) => {
7474
});
7575

7676
return [clientBundleConfig, serverBundleConfig];
77-
};
77+
};
Collapse file

‎templates/ReactSpa/webpack.config.js‎

Copy file name to clipboardExpand all lines: templates/ReactSpa/webpack.config.js
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ module.exports = (env) => {
99
return [{
1010
stats: { modules: false },
1111
entry: { 'main': './ClientApp/boot.tsx' },
12-
resolve: { extensions: [ '.js', '.jsx', '.ts', '.tsx' ] },
12+
resolve: { extensions: ['.js', '.jsx', '.ts', '.tsx'] },
1313
output: {
1414
path: path.join(__dirname, bundleOutputDir),
1515
filename: '[name].js',
1616
publicPath: '/dist/'
1717
},
1818
module: {
1919
rules: [
20-
{ test: /\.ts(x?)$/, include: /ClientApp/, use: 'babel-loader' },
20+
{ test: /\.ts(x?)$/, include: /ClientApp/, use: { loader: 'babel-loader', options: { cacheDirectory: true } } },
2121
{ test: /\.tsx?$/, include: /ClientApp/, use: 'awesome-typescript-loader?silent=true' },
2222
{ test: /\.css$/, use: isDevBuild ? ['style-loader', 'css-loader'] : ExtractTextPlugin.extract({ use: 'css-loader' }) },
2323
{ test: /\.(png|jpg|jpeg|gif|svg)$/, use: 'url-loader?limit=25000' }
@@ -41,4 +41,4 @@ module.exports = (env) => {
4141
new ExtractTextPlugin('site.css')
4242
])
4343
}];
44-
};
44+
};

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.