You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I confirm that this is an issue rather than a question.
Bug report
As per the docs (0.x and 1.x), configureWebpack is supposed to take in a function. Currently, when I return an identity function, Vuepress throws errors in Chrome and cannot render.
I'm trying to merge my webpack configuration for vuepress in with my vue-cli + webpack configuration. Currently, when I point vuepress at my source, it fails to find my aliases.
I will resort to trying out Vuepress' webpackChain option to accomplish the same thing.
Create a Vuepress project with a README.md inside of docs/
Add a config.js file with the below contents
module.exports={description: 'My description',configureWebpack: config=>config,// I print out "config" in the additional info section};
Run the project
Open Chrome and the dev tools
What is expected?
Site renders the README file.
What is actually happening?
Errors in the chrome console relating to stylus loader
Nothing renders
Uncaught Error: Module build failed (from ./node_modules/stylus-loader/index.js):
ParseError: /Users/jessicasachs/projects/vuepress-configure-webpack-broken/node_modules/@vuepress/plugin-nprogress/nprogress.styl:4:194
1| // style-loader: Adds some css to the DOM by adding a <style> tag
2|
3| // load the styles
4| var content = require("!!../../css-loader/dist/cjs.js??ref--29-oneOf-1-1!../../postcss-loader/src/index.js??ref--29-oneOf-1-2!../../stylus-loader/index.js??ref--29-oneOf-1-3!./nprogress.styl");
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------^
5| if(typeof content === 'string') content = [[module.id, content, '']];
6| if(content.locals) module.exports = content.locals;
7| // add the styles to the DOM
expected "indent", got ";"
at Parser.error (/Users/jessicasachs/projects/vuepress-configure-webpack-broken/node_modules/stylus/lib/parser.js:259)
at Parser.expect (/Users/jessicasachs/projects/vuepress-configure-webpack-broken/node_modules/stylus/lib/parser.js:287)
at Parser.block (/Users/jessicasachs/projects/vuepress-configure-webpack-broken/node_modules/stylus/lib/parser.js:845)
at Parser.selector (/Users/jessicasachs/projects/vuepress-configure-webpack-broken/node_modules/stylus/lib/parser.js:1555)
at Parser.ident (/Users/jessicasachs/projects/vuepress-configure-webpack-broken/node_modules/stylus/lib/parser.js:1446)
at Parser.stmt (/Users/jessicasachs/projects/vuepress-configure-webpack-broken/node_modules/stylus/lib/parser.js:778)
at Parser.statement (/Users/jessicasachs/projects/vuepress-configure-webpack-broken/node_modules/stylus/lib/parser.js:685)
at Parser.parse (/Users/jessicasachs/projects/vuepress-configure-webpack-broken/node_modules/stylus/lib/parser.js:236)
at Renderer.render (/Users/jessicasachs/projects/vuepress-configure-webpack-broken/node_modules/stylus/lib/renderer.js:80)
at /Users/jessicasachs/projects/vuepress-configure-webpack-broken/node_modules/stylus-loader/index.js:167
at tryCatchReject (/Users/jessicasachs/projects/vuepress-configure-webpack-broken/node_modules/when/lib/makePromise.js:840)
at runContinuation1 (/Users/jessicasachs/projects/vuepress-configure-webpack-broken/node_modules/when/lib/makePromise.js:799)
at Fulfilled.when (/Users/jessicasachs/projects/vuepress-configure-webpack-broken/node_modules/when/lib/makePromise.js:590)
at Pending.run (/Users/jessicasachs/projects/vuepress-configure-webpack-broken/node_modules/when/lib/makePromise.js:481)
at Scheduler._drain (/Users/jessicasachs/projects/vuepress-configure-webpack-broken/node_modules/when/lib/Scheduler.js:62)
at Scheduler.drain (/Users/jessicasachs/projects/vuepress-configure-webpack-broken/node_modules/when/lib/Scheduler.js:27)
at eval (cjs.js?!./node_modules/postcss-loader/src/index.js?!./node_modules/stylus-loader/index.js?!./node_modules/vue-style-loader/index.js!./node_modules/css-loader/dist/cjs.js?!./node_modules/postcss-loader/src/index.js?!./node_modules/stylus-loader/index.js?!./node_modules/@vuepress/plugin-nprogress/nprogress.styl:1)
at Object../node_modules/css-loader/dist/cjs.js?!./node_modules/postcss-loader/src/index.js?!./node_modules/stylus-loader/index.js?!./node_modules/vue-style-loader/index.js!./node_modules/css-loader/dist/cjs.js?!./node_modules/postcss-loader/src/index.js?!./node_modules/stylus-loader/index.js?!./node_modules/@vuepress/plugin-nprogress/nprogress.styl (app.js:4559)
at __webpack_require__ (app.js:1476)
at fn (app.js:833)
at eval (nprogress.styl?932b:4)
at Object../node_modules/@vuepress/plugin-nprogress/nprogress.styl (app.js:2242)
at __webpack_require__ (app.js:1476)
at fn (app.js:833)
at eval (enhanceAppFile.js?64a0:1)
at Module../node_modules/@vuepress/plugin-nprogress/enhanceAppFile.js (app.js:2231)
Other relevant information
Adding the appropriate "stylus" files does not fix the issue
Output of npx vuepress info in my VuePress project:
Environment Info:
System:
OS: macOS 10.14
CPU: (8) x64 Intel(R) Core(TM) i7-4980HQ CPU @ 2.80GHz
Binaries:
Node: 10.14.2 - /usr/local/bin/node
Yarn: 1.13.0 - /usr/local/bin/yarn
npm: 6.10.0 - /usr/local/bin/npm
Browsers:
Chrome: Not Found // I'm currently writing this issue on Chrome 75. This must be broken.
Firefox: 68.0.1
Safari: 12.0
npmPackages:
@vuepress/core: 1.0.3
@vuepress/theme-default: 1.0.3
vuepress: ^1.0.3 => 1.0.3
npmGlobalPackages:
vuepress: Not Found
Bug report
As per the docs (0.x and 1.x),
configureWebpack
is supposed to take in a function. Currently, when I return an identity function, Vuepress throws errors in Chrome and cannot render.I'm trying to merge my webpack configuration for vuepress in with my vue-cli + webpack configuration. Currently, when I point vuepress at my source, it fails to find my aliases.
I will resort to trying out Vuepress'
webpackChain
option to accomplish the same thing.Steps to reproduce
Repository Link: https://github.com/JessicaSachs/vuepress-broken-configurewebpack
docs/
config.js
file with the below contentsWhat is expected?
Site renders the README file.
What is actually happening?
Other relevant information
npx vuepress info
in my VuePress project:console.log(webpackConfig)
The text was updated successfully, but these errors were encountered: