Open anotherZero opened 2 years ago
How did you manage to make it work? I'm having the same issue
Hopefully there will be a better solution, but my current workaround is to update my webpack.mix.js file:
const mix = require('laravel-mix');
/*
|--------------------------------------------------------------------------
| Mix Asset Management
|--------------------------------------------------------------------------
|
| Mix provides a clean, fluent API for defining some Webpack build steps
| for your Laravel applications. By default, we are compiling the CSS
| file for the application as well as bundling up all the JS files.
|
*/
mix.webpackConfig({
resolve: {
alias: {
'@popperjs/core/lib/popper-lite': '@popperjs/core/lib/popper-lite.js',
'@popperjs/core/lib/modifiers/preventOverflow': '@popperjs/core/lib/modifiers/preventOverflow.js',
'@popperjs/core/lib/modifiers/flip': '@popperjs/core/lib/modifiers/flip.js',
'lodash-es/uniq': 'lodash-es/uniq.js',
'lodash-es/find': 'lodash-es/find.js',
'lodash-es/clone': 'lodash-es/clone.js',
'lodash-es/filter': 'lodash-es/filter.js',
'lodash-es/findKey': 'lodash-es/findKey.js',
'lodash-es/forEach': 'lodash-es/forEach.js',
'lodash-es/isEqual': 'lodash-es/isEqual.js',
'lodash-es/map': 'lodash-es/map.js',
'lodash-es/pickBy': 'lodash-es/pickBy.js',
},
},
})
.js('resources/js/app.js', 'public/js')
.vue()
.postCss('resources/css/app.css', 'public/css', [
require('postcss-import'),
require('tailwindcss'),
require('autoprefixer'),
])
.alias({
'@': 'resources/js',
});
It seems that Laravel Mix (strict configurations of webpack?) require that imports have a .js extension. I was able to tweak the
dist/inertiajs-tables-laravel-query-builder.es.js
to use the .js extenstions for all imports from lodash-es and popperjs and I was able to build a page using this package.I would be happy to contribute a PR if I can get a little guidance. I was thinking that I could update the
js/Components/*.vue
files, but I'm not sure that's the appropriate route to take.The following is a snippet of the build failures I'm encountering when trying to build a page using this package.