Skip to content

Commit a033a40

Browse files
committed
build: fix build system not working with Nuxt SSR
1 parent fc99319 commit a033a40

File tree

6 files changed

+17
-5
lines changed

6 files changed

+17
-5
lines changed

api-extractor.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@
1313
},
1414

1515
"dtsRollup": {
16-
"enabled": true,
17-
"untrimmedFilePath": "./dist/index.d.ts"
16+
"enabled": false
1817
},
1918

2019
"tsdocMetadata": {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"browser": "dist/vuex-orm.esm.js",
77
"module": "dist/vuex-orm.esm-bundler.js",
88
"unpkg": "dist/vuex-orm.global.js",
9-
"typings": "dist/index.d.ts",
9+
"typings": "dist/src/index.d.ts",
1010
"files": [
1111
"dist"
1212
],

scripts/build.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@ function checkSize(file) {
4747

4848
async function generateApiDocs() {
4949
await execa('yarn', ['build:dts'], { stdio: 'inherit' })
50-
51-
await fs.remove('dist/src')
5250
}
5351

5452
run()

src/index.cjs.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ import { install } from './store/Store'
44
import { Database } from './database/Database'
55
import { Schema } from './schema/Schema'
66
import { Model } from './model/Model'
7+
import { Attr } from './model/decorators/attributes/types/Attr'
8+
import { Str } from './model/decorators/attributes/types/Str'
9+
import { Num } from './model/decorators/attributes/types/Num'
10+
import { Bool } from './model/decorators/attributes/types/Bool'
11+
import { HasOne } from './model/decorators/attributes/relations/HasOne'
12+
import { BelongsTo } from './model/decorators/attributes/relations/BelongsTo'
13+
import { HasMany } from './model/decorators/attributes/relations/HasMany'
714
import { Attribute } from './model/attributes/Attribute'
815
import { Type } from './model/attributes/types/Type'
916
import { Attr as AttrAttr } from './model/attributes/types/Attr'
@@ -23,6 +30,13 @@ export default {
2330
Database,
2431
Schema,
2532
Model,
33+
Attr,
34+
Str,
35+
Num,
36+
Bool,
37+
HasOne,
38+
BelongsTo,
39+
HasMany,
2640
Attribute,
2741
Type,
2842
AttrAttr,

src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import './polyfills/Polyfills'
2+
import './types/vuex'
23

34
export * from './data/Data'
45
export * from './store/Store'
File renamed without changes.

0 commit comments

Comments
 (0)