Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: replace read-pkg-up with escalade (#187)
Ref https://packagephobia.com/result?p=read-pkg-up read-pkg-up is quite big package with many dependencies. It solves cases not necessary for this project like pretty json errors and normalisation of package.json data. In this diff I replaced it with dependency-free escalade and parsed json with native JSON.parse. This will let users to have faster installation and less bloated node_modules.
- Loading branch information
Showing
9 changed files
with
164 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
const main = document.querySelector('main'); | ||
main.innerHTML = 'main'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
const { resolve } = require('path'); | ||
|
||
const getPort = require('get-port'); | ||
|
||
const { WebpackPluginServe: Serve } = require('../../../lib/'); | ||
|
||
module.exports = { | ||
context: __dirname, | ||
entry: ['./app.js', 'webpack-plugin-serve/client'], | ||
mode: 'development', | ||
output: { | ||
filename: './output.js', | ||
path: resolve(__dirname, './output'), | ||
publicPath: 'output/' | ||
}, | ||
plugins: [ | ||
new Serve({ | ||
host: 'localhost', | ||
port: getPort({ port: 55555 }), | ||
ramdisk: true | ||
}) | ||
], | ||
resolve: { | ||
alias: { | ||
'webpack-plugin-serve/client': resolve(__dirname, '../../../client') | ||
} | ||
}, | ||
watch: true | ||
}; |
Oops, something went wrong.