|
|
@ -2,15 +2,8 @@ |
|
|
|
|
|
|
|
/* eslint-disable @typescript-eslint/no-var-requires */ |
|
|
|
const path = require('path'); |
|
|
|
const fs = require('fs-extra'); |
|
|
|
const { lessLoader } = require('esbuild-plugin-less'); |
|
|
|
|
|
|
|
// build @imove/core first, if in imove repo
|
|
|
|
const CORE_DIR = path.join(__dirname, '../../../../core'); |
|
|
|
if (fs.pathExistsSync(CORE_DIR)) { |
|
|
|
require('child_process').execSync(`cd ${CORE_DIR} && rollup -c`); |
|
|
|
} |
|
|
|
|
|
|
|
// build js and css for editor
|
|
|
|
const OUT_FILE = path.join(__dirname, 'template/dist/app.bundle.js'); |
|
|
|
require('esbuild') |
|
|
@ -19,6 +12,7 @@ require('esbuild') |
|
|
|
entryPoints: [path.join(__dirname, 'template/app.jsx')], |
|
|
|
outfile: OUT_FILE, |
|
|
|
plugins: [ |
|
|
|
// fix multi-react with lerna
|
|
|
|
{ |
|
|
|
name: 'resolve-multi-react', |
|
|
|
setup: (build) => { |
|
|
|