@resin/pinejs
Version:
Pine.js is a sophisticated rules-driven API engine that enables you to define rules in a structured subset of English. Those rules are used in order for Pine.js to generate a database schema and the associated [OData](http://www.odata.org/) API. This make
67 lines (64 loc) • 1.37 kB
text/typescript
import type { RequiredField } from '../src/sbvr-api/common-types';
import * as path from 'path';
import * as webpack from 'webpack';
const root = path.dirname(__dirname);
export = {
mode: 'production',
devtool: 'source-map',
entry: root,
output: {
libraryTarget: 'commonjs',
path: root,
filename: 'out/pine.js',
},
target: 'node',
node: {
process: false,
global: false,
Buffer: false,
__dirname: false,
__filename: false,
},
externals: {
bcrypt: true,
bcryptjs: true,
bluebird: true,
'body-parser': true,
child_process: true,
coffeescript: true,
'coffeescript/register': true,
'ts-node/register': true,
compression: true,
'cookie-parser': true,
express: true,
'express-session': true,
fs: true,
lodash: true,
'method-override': true,
multer: true,
mysql: true,
passport: true,
'passport-local': true,
'pinejs-client-core': true,
pg: true,
'serve-static': true,
'typed-error': true,
},
resolve: {
extensions: ['.js', '.ts'],
},
plugins: [new webpack.optimize.LimitChunkCountPlugin({ maxChunks: 1 })],
module: {
rules: [
{ test: /\.sbvr$/, use: 'raw-loader' },
{
test: /\.ts$|\.js$/,
exclude: /node_modules/,
use: 'ts-loader',
},
],
},
} as RequiredField<
webpack.Configuration,
'plugins' | 'resolve' | 'externals'
> & { externals: webpack.ExternalsObjectElement };