Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: remove publicPath from webpack dev config #2173

Merged

Conversation

johnpaulmedina
Copy link
Contributor

Added rootDir const to webpack dev config. Should resolve issue with build we discussed on #2167

@coveralls
Copy link

coveralls commented Jan 25, 2021

Coverage Status

Coverage remained the same at 82.454% when pulling 3d645f6 on johnpaulmedina:hotfix/webpack-dev-config into d200517 on katspaugh:master.

Copy link
Contributor

@thijstriemstra thijstriemstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @johnpaulmedina. Previously localhost:8080 showed a file listing of the rootdir and after some tweaking this is what most resembles prev situation:

diff --git a/build-config/fragments/dev.js b/build-config/fragments/dev.js
index 57bcc0e..c432996 100644
--- a/build-config/fragments/dev.js
+++ b/build-config/fragments/dev.js
@@ -1,6 +1,7 @@
 /* eslint-env node */
 
 const path = require('path');
+const rootDir = path.resolve(__dirname, '..', '..');
 
 module.exports = {
     mode: 'development',
@@ -11,9 +12,8 @@ module.exports = {
     devServer: {
         static: [
             {
-                directory: path.resolve(__dirname, '..', '..'),
+                directory: rootDir,
                 staticOptions: {},
-                publicPath: '/dist/',
                 serveIndex: true,
                 watch: {
                     ignored: [

Otherwise browsing to localhost:8080 will result in a GET error. Can you make test and make these changes?

@thijstriemstra thijstriemstra changed the title Webpack dev config - added rootDir build: added rootDir to webpack dev config Jan 25, 2021
Copy link
Contributor Author

@johnpaulmedina johnpaulmedina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it. I tested it and it now serves the root dir as requested. So the localhost can access either directory now as previously.

@thijstriemstra thijstriemstra changed the title build: added rootDir to webpack dev config build: remove publicPath from webpack dev config Jan 25, 2021
Copy link
Contributor

@thijstriemstra thijstriemstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@thijstriemstra thijstriemstra merged commit 8e77b52 into katspaugh:master Jan 25, 2021
@johnpaulmedina johnpaulmedina deleted the hotfix/webpack-dev-config branch January 25, 2021 22:30
sandiz pushed a commit to sandiz/wavesurfer.js that referenced this pull request Sep 1, 2021
* Webpack dev config - added rootDir

* Update to allow root access on webpack build-configs/dev

* Remove unnecessary options on webpack dev config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants