mirror of
https://github.com/openharmony/developtools_ace-js2bundle.git
synced 2026-07-19 10:15:08 -04:00
!153 conditional compilation through DefinePlugin
Merge pull request !153 from houhaoyu/master
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