mirror of
https://github.com/WeBankFinTech/fes.js.git
synced 2025-04-06 03:59:53 +08:00
21 lines
559 B
JavaScript
21 lines
559 B
JavaScript
import { dirname } from 'path';
|
|
import { Service as CoreService } from '@webank/fes-compiler';
|
|
|
|
class Service extends CoreService {
|
|
constructor(opts) {
|
|
process.env.FES_VERSION = require('../package').version;
|
|
process.env.FES_DIR = dirname(require.resolve('../package'));
|
|
|
|
super({
|
|
...opts,
|
|
presets: [
|
|
require.resolve('@webank/fes-preset-built-in'),
|
|
...(opts.presets || [])
|
|
],
|
|
plugins: [...(opts.plugins || [])]
|
|
});
|
|
}
|
|
}
|
|
|
|
export { Service };
|