Skip to content

Instantly share code, notes, and snippets.

@kellymears
Last active November 25, 2021 23:56
Show Gist options
  • Save kellymears/462a82dc1a03d50a1d81cdabd167d2fe to your computer and use it in GitHub Desktop.
Save kellymears/462a82dc1a03d50a1d81cdabd167d2fe to your computer and use it in GitHub Desktop.
/**
* 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'});
/**
* 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'});
/**
* 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'});
/**
* 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