Skip to content

Commit

Permalink
Enable the source maps for the dependencies
Browse files Browse the repository at this point in the history
See How to load library source maps using webpack? https://stackoverflow.com/a/32749125/990356
  • Loading branch information
tkrotoff committed Apr 23, 2018
1 parent fa0de7f commit 3e49b14
Show file tree
Hide file tree
Showing 24 changed files with 26 additions and 1 deletion.
1 change: 1 addition & 0 deletions examples/Bootstrap4/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"babel-core": "latest",
"babel-preset-react": "latest",
"file-loader": "latest",
"source-map-loader": "latest",

"del-cli": "latest",
"cross-env": "latest"
Expand Down
2 changes: 2 additions & 0 deletions examples/Bootstrap4/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ module.exports = {
module: {
rules: [
{ test: /\.jsx?$/, exclude: /node_modules/, loader: 'babel-loader', options: {presets: ['react']} },
{ test: /\.js$/, loader: 'source-map-loader' },
{ test: /\.(html|css|png)$/, loader: 'file-loader', options: {name: '[path][name].[ext]'} },
{
// FIXME Don't know how to make source maps work
test: /\.scss$/,
use: ExtractTextPlugin.extract({
fallback: 'style-loader',
Expand Down
1 change: 1 addition & 0 deletions examples/ClubMembers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"@types/webpack": "latest",
"ts-loader": "^3",
"file-loader": "latest",
"source-map-loader": "latest",

"del-cli": "latest",
"cross-env": "latest"
Expand Down
1 change: 1 addition & 0 deletions examples/ClubMembers/webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const config: Configuration = {
module: {
rules: [
{ test: /\.tsx?$/, loader: 'ts-loader', options: {onlyCompileBundledFiles: true, compilerOptions: {noEmit: false, module: 'esnext', declaration: false}} },
{ test: /\.js$/, loader: 'source-map-loader' },
{ test: /\.(html|css|png)$/, loader: 'file-loader', options: {name: '[path][name].[ext]'} }
]
}
Expand Down
1 change: 1 addition & 0 deletions examples/HTML5Constraints/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"@types/webpack": "latest",
"ts-loader": "^3",
"file-loader": "latest",
"source-map-loader": "latest",

"del-cli": "latest",
"cross-env": "latest"
Expand Down
1 change: 1 addition & 0 deletions examples/HTML5Constraints/webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const config: Configuration = {
module: {
rules: [
{ test: /\.tsx?$/, loader: 'ts-loader', options: {onlyCompileBundledFiles: true, compilerOptions: {noEmit: false, module: 'esnext', declaration: false}} },
{ test: /\.js$/, loader: 'source-map-loader' },
{ test: /\.(html|css|png)$/, loader: 'file-loader', options: {name: '[name].[ext]'} }
]
}
Expand Down
1 change: 1 addition & 0 deletions examples/HttpStatusCode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"@types/webpack": "latest",
"ts-loader": "^3",
"file-loader": "latest",
"source-map-loader": "latest",

"del-cli": "latest",
"cross-env": "latest"
Expand Down
1 change: 1 addition & 0 deletions examples/HttpStatusCode/webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const config: Configuration = {
module: {
rules: [
{ test: /\.tsx?$/, loader: 'ts-loader', options: {onlyCompileBundledFiles: true, compilerOptions: {noEmit: false, module: 'esnext', declaration: false}} },
{ test: /\.js$/, loader: 'source-map-loader' },
{ test: /\.(html|css|png)$/, loader: 'file-loader', options: {name: '[name].[ext]'} }
]
}
Expand Down
1 change: 1 addition & 0 deletions examples/MDN_Form_validation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"@types/webpack": "latest",
"ts-loader": "^3",
"file-loader": "latest",
"source-map-loader": "latest",

"del-cli": "latest",
"cross-env": "latest"
Expand Down
1 change: 1 addition & 0 deletions examples/MDN_Form_validation/webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const config: Configuration = {
module: {
rules: [
{ test: /\.tsx?$/, loader: 'ts-loader', options: {onlyCompileBundledFiles: true, compilerOptions: {noEmit: false, module: 'esnext', declaration: false}} },
{ test: /\.js$/, loader: 'source-map-loader' },
{ test: /\.(html|css|png)$/, loader: 'file-loader', options: {name: '[name].[ext]'} }
]
}
Expand Down
1 change: 1 addition & 0 deletions examples/NativeFormWidgets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"@types/webpack": "latest",
"ts-loader": "^3",
"file-loader": "latest",
"source-map-loader": "latest",

"del-cli": "latest",
"cross-env": "latest"
Expand Down
1 change: 1 addition & 0 deletions examples/NativeFormWidgets/webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const config: Configuration = {
module: {
rules: [
{ test: /\.tsx?$/, loader: 'ts-loader', options: {onlyCompileBundledFiles: true, compilerOptions: {noEmit: false, module: 'esnext', declaration: false}} },
{ test: /\.js$/, loader: 'source-map-loader' },
{ test: /\.(html|css|png)$/, loader: 'file-loader', options: {name: '[name].[ext]'} }
]
}
Expand Down
1 change: 1 addition & 0 deletions examples/NoFramework/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"@types/webpack": "latest",
"ts-loader": "^3",
"file-loader": "latest",
"source-map-loader": "latest",

"del-cli": "latest",
"cross-env": "latest"
Expand Down
1 change: 1 addition & 0 deletions examples/NoFramework/webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const config: Configuration = {
module: {
rules: [
{ test: /\.tsx?$/, loader: 'ts-loader', options: {onlyCompileBundledFiles: true, compilerOptions: {noEmit: false, module: 'esnext', declaration: false}} },
{ test: /\.js$/, loader: 'source-map-loader' },
{ test: /\.(html|css|png)$/, loader: 'file-loader', options: {name: '[name].[ext]'} }
]
}
Expand Down
1 change: 1 addition & 0 deletions examples/Password/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"@types/webpack": "latest",
"ts-loader": "^3",
"file-loader": "latest",
"source-map-loader": "latest",

"del-cli": "latest",
"cross-env": "latest"
Expand Down
1 change: 1 addition & 0 deletions examples/Password/webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const config: Configuration = {
module: {
rules: [
{ test: /\.tsx?$/, loader: 'ts-loader', options: {onlyCompileBundledFiles: true, compilerOptions: {noEmit: false, module: 'esnext', declaration: false}} },
{ test: /\.js$/, loader: 'source-map-loader' },
{ test: /\.(html|css|png)$/, loader: 'file-loader', options: {name: '[path][name].[ext]'} }
]
}
Expand Down
1 change: 1 addition & 0 deletions examples/PasswordNoState/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"@types/webpack": "latest",
"ts-loader": "^3",
"file-loader": "latest",
"source-map-loader": "latest",

"del-cli": "latest",
"cross-env": "latest"
Expand Down
1 change: 1 addition & 0 deletions examples/PasswordNoState/webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const config: Configuration = {
module: {
rules: [
{ test: /\.tsx?$/, loader: 'ts-loader', options: {onlyCompileBundledFiles: true, compilerOptions: {noEmit: false, module: 'esnext', declaration: false}} },
{ test: /\.js$/, loader: 'source-map-loader' },
{ test: /\.(html|css|png)$/, loader: 'file-loader', options: {name: '[name].[ext]'} }
]
}
Expand Down
1 change: 1 addition & 0 deletions examples/ServerSideRendering/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"@types/webpack-node-externals": "latest",
"ts-loader": "^3",
"file-loader": "latest",
"source-map-loader": "latest",

"del-cli": "latest",
"cross-env": "latest"
Expand Down
3 changes: 2 additions & 1 deletion examples/ServerSideRendering/webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ const config: Configuration[] = [
resolve: {extensions},
module: {
rules: [
tsLoaderRule
tsLoaderRule,
{ test: /\.js$/, loader: 'source-map-loader' }
]
}
}
Expand Down
1 change: 1 addition & 0 deletions examples/SignUp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"@types/webpack": "latest",
"ts-loader": "^3",
"file-loader": "latest",
"source-map-loader": "latest",

"del-cli": "latest",
"cross-env": "latest"
Expand Down
1 change: 1 addition & 0 deletions examples/SignUp/webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const config: Configuration = {
module: {
rules: [
{ test: /\.tsx?$/, loader: 'ts-loader', options: {onlyCompileBundledFiles: true, compilerOptions: {noEmit: false, module: 'esnext', declaration: false}} },
{ test: /\.js$/, loader: 'source-map-loader' },
{ test: /\.(html|css|png)$/, loader: 'file-loader', options: {name: '[name].[ext]'} }
]
}
Expand Down
1 change: 1 addition & 0 deletions examples/WizardForm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"@types/webpack": "latest",
"ts-loader": "^3",
"file-loader": "latest",
"source-map-loader": "latest",

"del-cli": "latest",
"cross-env": "latest"
Expand Down
1 change: 1 addition & 0 deletions examples/WizardForm/webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const config: Configuration = {
module: {
rules: [
{ test: /\.tsx?$/, loader: 'ts-loader', options: {onlyCompileBundledFiles: true, compilerOptions: {noEmit: false, module: 'esnext', declaration: false}} },
{ test: /\.js$/, loader: 'source-map-loader' },
{ test: /\.(html|css|png)$/, loader: 'file-loader', options: {name: '[name].[ext]'} }
]
}
Expand Down

0 comments on commit 3e49b14

Please sign in to comment.