mirror of
https://github.com/serverless/serverless.git
synced 2026-01-18 14:58:43 +00:00
set dev mode for local developments
This commit is contained in:
parent
c8b42bee9d
commit
375f72e657
@ -3,22 +3,16 @@ const slsw = require('serverless-webpack');
|
||||
|
||||
const entries = {};
|
||||
|
||||
Object.keys(slsw.lib.entries).forEach(key => (
|
||||
entries[key] = ['./source-map-install.js', slsw.lib.entries[key]]
|
||||
));
|
||||
Object.keys(slsw.lib.entries).forEach(
|
||||
key => (entries[key] = ['./source-map-install.js', slsw.lib.entries[key]])
|
||||
);
|
||||
|
||||
module.exports = {
|
||||
mode: 'production',
|
||||
mode: slsw.lib.webpack.isLocal ? 'development' : 'production',
|
||||
entry: entries,
|
||||
devtool: 'source-map',
|
||||
resolve: {
|
||||
extensions: [
|
||||
'.js',
|
||||
'.jsx',
|
||||
'.json',
|
||||
'.ts',
|
||||
'.tsx'
|
||||
]
|
||||
extensions: ['.js', '.jsx', '.json', '.ts', '.tsx'],
|
||||
},
|
||||
output: {
|
||||
libraryTarget: 'commonjs',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user