You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-07-03 23:50:33 +02:00
Plugin Repo: Add support for source maps
This commit is contained in:
@ -3,10 +3,19 @@ const webpack = require('webpack');
|
||||
|
||||
const distDir = path.resolve(__dirname, 'dist');
|
||||
|
||||
// To get source maps working:
|
||||
//
|
||||
// - Need to add `require('source-map-support').install()` on top of index.ts
|
||||
// - Set `devtool: 'source-map'`
|
||||
// - It only works in development mode
|
||||
// - Need to add the "source-map-loader" rule so that it uses the maps generated
|
||||
// by TypeScript
|
||||
|
||||
module.exports = {
|
||||
entry: './index.js',
|
||||
mode: 'production',
|
||||
mode: 'development',
|
||||
target: 'node',
|
||||
devtool: 'source-map',
|
||||
output: {
|
||||
filename: 'index.js',
|
||||
path: distDir,
|
||||
@ -17,4 +26,13 @@ module.exports = {
|
||||
raw: true,
|
||||
}),
|
||||
],
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.js$/,
|
||||
enforce: 'pre',
|
||||
use: ['source-map-loader'],
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
|
Reference in New Issue
Block a user