Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
/**
* 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