Skip to content

Commit 5348c09

Browse files
committed
publish init
1 parent 84efd53 commit 5348c09

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

.npmrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# require-split-chunk-webpack-plugin
2+
3+
该插件用于在 Nodejs 环境下代码分割中自动`require`分割出去的文件。

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
{
22
"name": "require-split-chunk-webpack-plugin",
3-
"version": "0.0.2",
3+
"version": "0.1.0",
44
"description": "require splited chunk code in entry file",
55
"main": "./dist/index.js",
6+
"types": "./dist/index.js",
67
"scripts": {
78
"watch": "tsc -w -p .",
89
"compile": "tsc --declaration -p ."
910
},
11+
"files": ["dist", "package.json", "README.md"],
1012
"author": "xiaoboost",
1113
"license": "MIT",
1214
"repository": {

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ export class RequireSplitChunkPlugin {
117117
const { output } = compiler.options;
118118

119119
// 读取编译配置
120-
this.publicPath = output?.path || output?.publicPath || '';
120+
this.publicPath = output?.publicPath || output?.path || '';
121121
// 完成编译时触发
122122
compiler.hooks.compilation.tap(this.name, this.afterCompilation.bind(this));
123123
}

0 commit comments

Comments
 (0)