Comments (10)
I can see in the repo that a version 2.0 is being developed with ViteJs. This will probably solve the problem. @pascalbaljet Do you have a release date in mind? Thanks!
from inertiajs-tables-laravel-query-builder.
It's fixed in v2, but I'll try to backport the fix to v1.
from inertiajs-tables-laravel-query-builder.
@libero-software I have the same issue but only with npm run dev
not with npm run build
. I have just made the migration to ''ViteJS''. For me it's related to this migration
from inertiajs-tables-laravel-query-builder.
@libero-software Same issue here. I just migrated from Laravel Mix to Vite. Before it worked.
from inertiajs-tables-laravel-query-builder.
The problem is the:
import qs from "qs";
If you remove this, the table will render in vitejs's 'yarn run dev'.
But the table won't work, because 'stringify' is used from the 'qs' package.
from inertiajs-tables-laravel-query-builder.
I just had the same problem. Has anyone found a solution?
from inertiajs-tables-laravel-query-builder.
When I build in production I get this message if it helps.
from inertiajs-tables-laravel-query-builder.
Vite doesnt support module.exports {} / require(), only export default {} / import .. from .. (ES6 syntax)
node_modules with require(); and module.exports should be changed or replaced or ported
Vite caches node_modules in node_modules/.vite. Rerunning npm run dev does not clear this cache.
Steps I took to work around this problem are as follows:
node_modules/qs/index.js replace content with:
'use strict';
import stringify from './stringify';
import parse from './parse';
import formats from './formats';
export default {
formats: formats,
parse: parse,
stringify: stringify
};
node_modules/qs/formats.js
replace line 11
module.exports = {
with
export default {
node_modules/qs/utils.js
replace line 3
var formats = require('./formats');
with
import formats from './formats';
replace line 241
module.exports = {
with
export default {
node_modules/qs/parse.js
replace line 3
var utils = require('./utils');
with
import utils from './utils';
replace line 239
module.exports = function (str, opts) {
with
export default function (str, opts) {
node_modules/qs/stringify.js
replace line 3
var getSideChannel = require('side-channel');
with
// var getSideChannel = require('side-channel');
replace line 4,5
var utils = require('./utils');
var formats = require('./formats');
with
import utils from './utils';
import formats from './formats';
replace line 241
module.exports = function (object, opts) {
with
export default function (object, opts) {
replace line 169
var valueSideChannel = getSideChannel();
with
var valueSideChannel = new WeakMap();
replace line 285
var sideChannel = getSideChannel();
with
var sideChannel = new WeakMap();
After changing the lines remove the node_modules/.vite folder and run npm run dev.
Then the table should be functioning again.
getSideChannel contains code or leads to code that that currently cannot easily or will not be changed to ES6 syntax.
getSideChannel returns a (equivelant) of WeakMap which is available in most browsers.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap
Edited: after some time (idle) parse.js also throws an error, so also change parse.js
Maybe urlsearchparameters could be used instead of qs in the next version? weakmap and urlsearchparameters can both be polyfilled
from inertiajs-tables-laravel-query-builder.
Great, thanks!
When are you planning to release V2?
from inertiajs-tables-laravel-query-builder.
V2 has been released, but is also breaks on production builds...
from inertiajs-tables-laravel-query-builder.
Related Issues (20)
- Input search range ( example for price min & max) HOT 8
- Reset button not working when global search is in slots HOT 3
- Is selectFilter using wildcards? HOT 2
- Chrome global search doesn't seem to be holding its focus state HOT 1
- I there any way to selectFilter sort by if the value is numerical HOT 5
- Laravel Mix build requires imports to have .js extensions HOT 2
- Support for Bootstrap
- style HOT 2
- API Resource
- v2.1.0 error popper.js with Vite 3.1.3 HOT 1
- Request for Tailwind CSS Prefix Option
- [FEATURE]: Support for default scaffolding like jet stream should be provided. HOT 1
- -1 as perPage parameter creates invalid SQL queries
- Column option to sort null values last HOT 1
- Compatibility with Inertia.js v1 HOT 4
- Proper way to style the table? HOT 1
- Pagination: changing page submits two requests HOT 2
- Is it possible to use slots inside of slots or is there any documentation with examples of each of them? HOT 2
- Reset button not working when used in slots HOT 3
- How to call a function when loading or reloading the table ?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from inertiajs-tables-laravel-query-builder.