Skip to content

Commit

Permalink
Alias for browser bundle via webpack, not browser field
Browse files Browse the repository at this point in the history
  • Loading branch information
sirreal committed Jun 11, 2020
1 parent 94628bd commit c685477
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/wpcom.js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
"import": "dist/esm/index.js",
"require": "dist/cjs/index.js"
},
"browser": {
"./dist/cjs/lib/util/fs.js": "./dist/cjs/lib/util/fs-browser.js",
"./dist/esm/lib/util/fs.js": "./dist/esm/lib/util/fs-browser.js"
},
"type": "module",
"author": "Automattic, Inc.",
"private": true,
Expand All @@ -15,7 +19,7 @@
"prepublish": "check-npm-client && yarn run clean",
"prepare": "check-npm-client && run-s build:modules build:bundle",
"build:modules": "check-npm-client && transpile",
"build:bundle": "check-npm-client && webpack --display errors-only"
"build:bundle": "check-npm-client && webpack --display errors-only --config webpack.config.browser.cjs"
},
"keywords": [
"wordpress",
Expand All @@ -36,10 +40,6 @@
"History.md",
"README.md"
],
"browser": {
"./dist/cjs/lib/util/fs.js": "./dist/cjs/lib/util/fs-browser.js",
"./dist/esm/lib/util/fs.js": "./dist/esm/lib/util/fs-browser.js"
},
"dependencies": {
"@babel/runtime": "^7.8.3",
"debug": "^4.1.1",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// This is to build a browser version
const path = require( 'path' );
module.exports = {
mode: 'production',
entry: __dirname + '/dist/esm/index.js',
Expand Down

0 comments on commit c685477

Please sign in to comment.