1 Star 0 Fork 8

nobug/grapesjs_1

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
webpack.config.js 930 Bytes
一键复制 编辑 原始数据 按行查看 历史
import path from 'path';
import webpack from 'webpack';
import pkg from './package.json';
const rootDir = path.resolve(__dirname);
export default ({ config }) => ({
...config,
output: {
...config.output,
filename: 'grapes.min.js',
// This will assign all exports to the global object
library: undefined,
},
devServer: {
...config.devServer,
static: [rootDir],
headers: { 'Access-Control-Allow-Origin': '*' },
allowedHosts: 'all',
},
resolve: {
...config.resolve,
modules: [
...(config.resolve && config.resolve.modules),
'src'
],
alias: {
...(config.resolve && config.resolve.alias),
jquery: 'utils/cash-dom',
backbone: `${rootDir}/node_modules/backbone`,
underscore: `${rootDir}/node_modules/underscore`,
}
},
plugins: [
new webpack.DefinePlugin({ __GJS_VERSION__: `'${pkg.version}'` }),
...config.plugins,
]
});
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/X_P_D_D/grapesjs_1.git
git@gitee.com:X_P_D_D/grapesjs_1.git
X_P_D_D
grapesjs_1
grapesjs_1
dev

搜索帮助