Move index.html and other .html files outside of the /src & /dist folders #205
-
The current setup is that all the files from within /src are essentially copied over into /dist. However I've been trying to amend the setup so that the new structure would be:
When I try to update the config though I can't get the setup to watch both the .html files and compile the css/js/images etc into the dist folder whilst still watching for file changes. I've tried setting up different path structures like below to test but it never works properly.
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
@Probablybest, in order to modify your copy of the setup to do the required you need to do the following modifications:
const templateFiles = fs.readdirSync(environment.paths.source) to this: const templateFiles = fs.readdirSync(environment.paths.source + '/../') Then change output: path.resolve(__dirname, '../dist/assets/'), And finally move your I am attaching a git |
Beta Was this translation helpful? Give feedback.
@Probablybest, in order to modify your copy of the setup to do the required you need to do the following modifications:
webpack.config.js
change this line:to this:
Then change
configuration/environment.js
paths.output to:And finally move your
.html
files one level above thesrc
directory as you have listed in your issue's description.I am attaching a git
.patch
file if you want to apply all the above changes at once:probablybest.patch