mirror of
https://github.com/openharmony/developtools_ace-js2bundle.git
synced 2026-07-20 21:59:23 -04:00
conditional compilation through DefinePlugin Signed-off-by: houhaoyu <houhaoyu@huawei.com> Change-Id: I1647b956083e41aac1ed1356a1b4b80785ddb036
This commit is contained in:
@@ -145,6 +145,10 @@ module.exports = (env) => {
|
||||
build: process.env.buildPath
|
||||
}),
|
||||
new ReturnExportsPlugin(),
|
||||
new webpack.DefinePlugin({
|
||||
STANDARD: JSON.stringify(false),
|
||||
LITE: JSON.stringify(true)
|
||||
})
|
||||
]
|
||||
webpackConfig.resolve = {
|
||||
modules: [
|
||||
|
||||
@@ -27,6 +27,7 @@ const { PLATFORM }= require('./lib/lite/lite-enum')
|
||||
const util = require('./lib/util')
|
||||
const TerserPlugin = require('terser-webpack-plugin')
|
||||
const CopyPlugin = require("copy-webpack-plugin")
|
||||
const webpack = require('webpack')
|
||||
let watchMode = (process.env.watchMode && process.env.watchMode === 'true') || false
|
||||
const {
|
||||
deleteFolderRecursive,
|
||||
@@ -254,6 +255,10 @@ module.exports = (env) => {
|
||||
new ResourcePlugin(process.env.projectPath, process.env.buildPath, process.env.aceManifestPath),
|
||||
new ResultStates({
|
||||
build: process.env.buildPath
|
||||
}),
|
||||
new webpack.DefinePlugin({
|
||||
STANDARD: JSON.stringify(true),
|
||||
LITE: JSON.stringify(false)
|
||||
})
|
||||
]
|
||||
config.resolve = {
|
||||
|
||||
Reference in New Issue
Block a user