Skip to content

Commit

Permalink
fix: 调整lib模块存放位置
Browse files Browse the repository at this point in the history
  • Loading branch information
wibetter committed Aug 14, 2024
1 parent 990cf1d commit 933597a
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 60 deletions.
20 changes: 5 additions & 15 deletions akfun.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ module.exports = {
webpack: {
resolve: {
// webpack的resolve配置
extensions: ['.js', '.jsx', '.vue', 'json'], // 用于配置webpack在尝试过程中用到的后缀列表
extensions: ['.js', '.jsx', '.umd.js', '.vue', 'json'], // 用于配置webpack在尝试过程中用到的后缀列表
alias: {
'@': resolve('src'),
$components: resolve('src/components'),
Expand Down Expand Up @@ -88,28 +88,18 @@ module.exports = {
entry: {
index: './src/main.js',
},
output: {
filename: '[name].js'
},
NODE_ENV: 'production', // development / production
libraryName: 'JSONSchemaEditor', // 构建第三方功能包时最后导出的引用变量名
assetsRoot: resolve('./dist'), // 打包后的文件绝对路径(物理路径)
assetsRoot: resolve('./lib'), // 打包后的文件绝对路径(物理路径)
assetsPublicPath: '/', // 设置静态资源的引用路径(根域名+路径)
assetsSubDirectory: '', // 资源引用二级路径
ignoreNodeModules: true,
productionSourceMap: false,
productionGzip: false,
productionGzipExtensions: ['js', 'css', 'json'],
bundleAnalyzerReport: false,
},
build2esm: {
index: './src/main.js',
output: {
dir: resolve('./esm'),
entryFileNames: '[name].js'
},
outDir: resolve('./esm'),
excludeList: [
'react',
'react-dom',
'antd'
]
}
};
7 changes: 0 additions & 7 deletions dist/index.css

This file was deleted.

35 changes: 0 additions & 35 deletions dist/index.umd.js

This file was deleted.

7 changes: 7 additions & 0 deletions lib/index.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions lib/index.js

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions lib/index.js.LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/*!
* @wibetter/json-schema-editor v5.0.0
* author: ldan@wibetter
* build tool: AKFun
* build time: Wed Aug 14 2024 17:49:04 GMT+0800 (China Standard Time)
* build tool info: https://github.com/wibetter/akfun
*/
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"author": "ldan@wibetter",
"license": "MIT",
"main": "dist/index.umd.js",
"main": "lib/index.js",
"scripts": {
"dev": "akfun dev",
"build2demo": "akfun build",
Expand Down
4 changes: 2 additions & 2 deletions src/demo1.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import * as React from 'react';
import ReactDOM from 'react-dom';
import { Switch } from 'antd';
import JSONSchemaEditor from './main';
// import JSONSchemaEditor from './main';
// import './index.scss';
import AceEditor from 'react-ace';
import 'ace-builds/src-noconflict/mode-json';
import 'ace-builds/src-noconflict/theme-solarized_light'; // ace-builds
import './index.scss';

/**
* json-schema-editor的测试Demo:含json-editor
Expand Down

0 comments on commit 933597a

Please sign in to comment.