fix: summernote 최신 버전에서 jQuery require 우회
This commit is contained in:
+13
-7
@@ -5,6 +5,7 @@ const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPl
|
|||||||
const { resolve } = require('path');
|
const { resolve } = require('path');
|
||||||
const CleanTerminalPlugin = require('clean-terminal-webpack-plugin');
|
const CleanTerminalPlugin = require('clean-terminal-webpack-plugin');
|
||||||
const { ESBuildMinifyPlugin } = require('esbuild-loader')
|
const { ESBuildMinifyPlugin } = require('esbuild-loader')
|
||||||
|
const webpack = require('webpack');
|
||||||
module.exports = (env, argv) => {
|
module.exports = (env, argv) => {
|
||||||
const target = env.target ?? 'hwe';
|
const target = env.target ?? 'hwe';
|
||||||
const mode = argv.mode ?? 'production';
|
const mode = argv.mode ?? 'production';
|
||||||
@@ -270,8 +271,13 @@ module.exports = (env, argv) => {
|
|||||||
cache: {
|
cache: {
|
||||||
type: 'filesystem',
|
type: 'filesystem',
|
||||||
},
|
},
|
||||||
};
|
externals: {
|
||||||
const gateway = {
|
// require("jquery") is external and available
|
||||||
|
// on the global var jQuery
|
||||||
|
"jQuery": "jquery"
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const gateway = {
|
||||||
name: 'gateway',
|
name: 'gateway',
|
||||||
resolve: {
|
resolve: {
|
||||||
extensions: [".js", ".ts", ".tsx"],
|
extensions: [".js", ".ts", ".tsx"],
|
||||||
@@ -360,12 +366,12 @@ module.exports = (env, argv) => {
|
|||||||
cache: {
|
cache: {
|
||||||
type: 'filesystem',
|
type: 'filesystem',
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
if (target == 'hwe') {
|
if (target == 'hwe') {
|
||||||
return [gateway, ingame_vue, ingame];
|
return [gateway, ingame_vue, ingame];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return [ingame_vue, ingame];
|
return [ingame_vue, ingame];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user