Skip to content

Commit

Permalink
fix(schema): fix webpack configuration to publish umd module
Browse files Browse the repository at this point in the history
  • Loading branch information
Romakita committed Dec 26, 2022
1 parent 1839adf commit e5e4f7e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 14 deletions.
6 changes: 3 additions & 3 deletions packages/specs/schema/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
"main": "./lib/cjs/index.js",
"module": "./lib/esm/index.js",
"typings": "./lib/types/index.d.ts",
"browser": "./lib/browser/main.js",
"browser": "./lib/browser/schema.umd.min.js",
"exports": {
"types": "./lib/types/index.d.ts",
"browser": "./lib/browser/main.js",
"browser": "./lib/browser/schema.umd.min.js",
"import": "./lib/esm/index.js",
"require": "./lib/cjs/index.js",
"default": "./lib/esm/index.js"
Expand Down Expand Up @@ -68,4 +68,4 @@
"optional": false
}
}
}
}
17 changes: 6 additions & 11 deletions packages/specs/schema/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
module.exports = {
mode: "development",
mode: "production",
devtool: "source-map",
stats: {warnings: false},
entry: {
main: "./src/index.ts"
},
output: {
path: __dirname + "/lib/browser/"
},
devServer: {
devMiddleware: {
writeToDisk: true
}
path: __dirname + "/lib/browser/",
filename: "schema.umd.min.js",
library: "schema",
libraryTarget: "umd"
},
resolve: {
extensions: [".tsx", ".ts", ".js"]
Expand Down Expand Up @@ -48,8 +46,5 @@ module.exports = {
]
},
plugins: [],
optimization: {
minimize: true,
concatenateModules: true
}
optimization: {}
};

0 comments on commit e5e4f7e

Please sign in to comment.