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 want to write some my own logic in client js (client/index.js & client/npm.dev.js). So I am trying to change the MainJS's path in entryies of webpack.js to compile my own version of client js.
Is it possible to do this?
Actually I tried to rewrite the entry function in custom next.config.js. But it never been called.
Thanks!
The text was updated successfully, but these errors were encountered:
lenny0702
changed the title
Rewriting entry function in custom next.config.js
Rewriting entry function or client js in custom next.config.js
Feb 23, 2017
lenny0702
changed the title
Rewriting entry function or client js in custom next.config.js
Rewriting entry function in custom next.config.js or client/npm-dev.js & client/index.js
Feb 23, 2017
You can access the full webpack config object with next.config.js and using webpack() function. Here entry is an object and try to log it and change as you need it.
module.exports={webpack: function(c){constoriginal=c.entryc.entry=function(){returnoriginal().then((entry)=>{// do something with itconsole.log(entry)returnentry})}returnc}}
lockbot
locked as resolved and limited conversation to collaborators
May 12, 2018
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I want to write some my own logic in client js (client/index.js & client/npm.dev.js). So I am trying to change the MainJS's path in entryies of webpack.js to compile my own version of client js.
Is it possible to do this?
Actually I tried to rewrite the entry function in custom next.config.js. But it never been called.
Thanks!
The text was updated successfully, but these errors were encountered: