Last active
November 25, 2021 23:56
-
-
Save kellymears/462a82dc1a03d50a1d81cdabd167d2fe to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* build.module.rules.after | |
*/ | |
module.exports = async (config) => | |
config | |
/** | |
* .mjs handling | |
*/ | |
.hooks.on('build.module.rules.after', (rules) => [ | |
...rules, | |
{ | |
test: /\.mjs$/i, | |
resolve: {byDependency: {esm: {fullySpecified: false}}}, | |
}, | |
]) | |
/** | |
* Application entrypoints | |
* | |
* Paths are relative to your resources directory | |
*/ | |
.entry({ | |
app: ['scripts/app.js', 'styles/app.css'], | |
editor: ['scripts/editor.js', 'styles/editor.css'], | |
customizer: 'scripts/customizer.js', | |
}) | |
/** | |
* These files should be processed as part of the build | |
* even if they are not explicitly imported in application assets. | |
*/ | |
.assets(['assets/images']) | |
/** | |
* These files will trigger a full page reload | |
* when modified. | |
*/ | |
.watch([ | |
'tailwind.config.js', | |
'resources/views/*.blade.php', | |
'app/View/**/*.php', | |
]) | |
/** | |
* Target URL to be proxied by the dev server. | |
* | |
* This is your local dev server. | |
*/ | |
.proxy({target: 'http://example.test'}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* build.module.rules.before | |
*/ | |
module.exports = async (config) => | |
config | |
/** | |
* .mjs handling | |
*/ | |
.hooks.on('build.module.rules.before', (rules) => [ | |
...rules, | |
{ | |
test: /\.mjs$/i, | |
resolve: {byDependency: {esm: {fullySpecified: false}}}, | |
}, | |
]) | |
/** | |
* Application entrypoints | |
* | |
* Paths are relative to your resources directory | |
*/ | |
.entry({ | |
app: ['scripts/app.js', 'styles/app.css'], | |
editor: ['scripts/editor.js', 'styles/editor.css'], | |
customizer: 'scripts/customizer.js', | |
}) | |
/** | |
* These files should be processed as part of the build | |
* even if they are not explicitly imported in application assets. | |
*/ | |
.assets(['assets/images']) | |
/** | |
* These files will trigger a full page reload | |
* when modified. | |
*/ | |
.watch([ | |
'tailwind.config.js', | |
'resources/views/*.blade.php', | |
'app/View/**/*.php', | |
]) | |
/** | |
* Target URL to be proxied by the dev server. | |
* | |
* This is your local dev server. | |
*/ | |
.proxy({target: 'http://example.test'}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* build.module.rules.oneOf | |
*/ | |
module.exports = async (config) => | |
config | |
/** | |
* .mjs handling | |
*/ | |
.hooks.on('build.module.rules.oneOf', (rules) => [ | |
...rules, | |
{ | |
test: /\.mjs$/i, | |
resolve: {byDependency: {esm: {fullySpecified: false}}}, | |
}, | |
]) | |
/** | |
* Application entrypoints | |
* | |
* Paths are relative to your resources directory | |
*/ | |
.entry({ | |
app: ['scripts/app.js', 'styles/app.css'], | |
editor: ['scripts/editor.js', 'styles/editor.css'], | |
customizer: 'scripts/customizer.js', | |
}) | |
/** | |
* These files should be processed as part of the build | |
* even if they are not explicitly imported in application assets. | |
*/ | |
.assets(['assets/images']) | |
/** | |
* These files will trigger a full page reload | |
* when modified. | |
*/ | |
.watch([ | |
'tailwind.config.js', | |
'resources/views/*.blade.php', | |
'app/View/**/*.php', | |
]) | |
/** | |
* Target URL to be proxied by the dev server. | |
* | |
* This is your local dev server. | |
*/ | |
.proxy({target: 'http://example.test'}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* config.override | |
*/ | |
module.exports = async (config) => | |
config | |
/** | |
* .mjs handling | |
*/ | |
.hooks.on('config.override', (configs) => { | |
configs[0].module.rules.unshift(mjs); | |
return configs; | |
}) | |
/** | |
* Application entrypoints | |
* | |
* Paths are relative to your resources directory | |
*/ | |
.entry({ | |
app: ['scripts/app.js', 'styles/app.css'], | |
editor: ['scripts/editor.js', 'styles/editor.css'], | |
customizer: 'scripts/customizer.js', | |
}) | |
/** | |
* These files should be processed as part of the build | |
* even if they are not explicitly imported in application assets. | |
*/ | |
.assets(['assets/images']) | |
/** | |
* These files will trigger a full page reload | |
* when modified. | |
*/ | |
.watch([ | |
'tailwind.config.js', | |
'resources/views/*.blade.php', | |
'app/View/**/*.php', | |
]) | |
/** | |
* Target URL to be proxied by the dev server. | |
* | |
* This is your local dev server. | |
*/ | |
.proxy({target: 'http://example.test'}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment