Use manual path resolution in webpack.config.js
Webpack doesn't support relative paths in the output.path config parameter, so this updated code uses the 'path' module to resolve the relative path.
This commit is contained in:
parent
82bc3f6501
commit
6a65ebc9af
1 changed files with 3 additions and 1 deletions
|
|
@ -70,10 +70,12 @@ Create a `.babelrc` file:
|
|||
Next, create a file called `webpack.config.js`
|
||||
|
||||
```javascript
|
||||
const path = require('path')
|
||||
|
||||
module.exports = {
|
||||
entry: './src/index.js',
|
||||
output: {
|
||||
path: './bin',
|
||||
path: path.resolve(__dirname, './bin'),
|
||||
filename: 'app.js',
|
||||
},
|
||||
module: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue