mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-24 10:27:10 +02:00
45 lines
745 B
JavaScript
45 lines
745 B
JavaScript
const path = require('path');
|
|
const CopyPlugin = require('copy-webpack-plugin');
|
|
|
|
module.exports = {
|
|
mode: 'production',
|
|
entry: './src/index.ts',
|
|
target: 'node',
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.tsx?$/,
|
|
use: 'ts-loader',
|
|
exclude: /node_modules/,
|
|
},
|
|
],
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
api: path.resolve(__dirname, 'api')
|
|
},
|
|
extensions: [ '.tsx', '.ts', '.js' ],
|
|
},
|
|
output: {
|
|
filename: 'index.js',
|
|
path: path.resolve(__dirname, 'dist'),
|
|
},
|
|
plugins: [
|
|
new CopyPlugin({
|
|
patterns: [
|
|
{
|
|
from: "**/*",
|
|
context: path.resolve(__dirname, 'src'),
|
|
to: path.resolve(__dirname, 'dist'),
|
|
globOptions: {
|
|
ignore: [
|
|
'**/*.ts',
|
|
'**/*.tsx',
|
|
],
|
|
},
|
|
},
|
|
],
|
|
}),
|
|
],
|
|
};
|