svelte-generic-crud-table icon indicating copy to clipboard operation
svelte-generic-crud-table copied to clipboard

Plugin svelte: The 'tag' option is used when generating a custom element. Did you forget the 'customElement: true' compile option?

Open Wiseacre-Software opened this issue 4 years ago • 1 comments

Getting the following message during compile time:

(!) Plugin svelte: The 'tag' option is used when generating a custom element. Did you forget the 'customElement: true' compile option?
node_modules\svelte-generic-crud-table\src\SvelteGenericCrudTable.svelte
1: <svelte:options tag={'crud-table'}/>
                   ^
2: <script>
3:     import {createEventDispatcher} from 'svelte';

My dependencies:

 "devDependencies": {
    "@babel/core": "^7.15.5",
    "@babel/preset-env": "^7.15.6",
    "@rollup/plugin-commonjs": "^17.0.0",
    "@rollup/plugin-json": "^4.1.0",
    "@rollup/plugin-node-resolve": "^11.0.0",
    "@testing-library/jest-dom": "^5.14.1",
    "@testing-library/svelte": "^3.0.3",
    "babel-jest": "^27.2.0",
    "jest": "^27.2.0",
    "rollup": "^2.3.4",
    "rollup-plugin-css-only": "^3.1.0",
    "rollup-plugin-livereload": "^2.0.0",
    "rollup-plugin-svelte": "^7.0.0",
    "rollup-plugin-terser": "^7.0.0",
    "svelte": "^3.0.0",
    "svelte-generic-crud-table": "^1.5.92",
    "svelte-jester": "^2.1.2"
  },

My svelte code is:

<SvelteGenericCrudTable table_config={table_config} table_data={tranxAccount.tranx} />

EDIT: the table is rendering on the screen. That was my fault.

Wiseacre-Software avatar Sep 17 '21 00:09 Wiseacre-Software

The config is set in: https://github.com/ivosdc/svelte-generic-crud-table/blob/master/rollup.config.js

plugins: [ svelte({ customElement: true, tag: "crud-table", emitCss: true }),

The additional <svelte:options tag={'crud-table'}/> in the svelte file was formerly needed for proper webcomponent behaviour. Don't know if it's still necessary.

ivosdc avatar Apr 10 '22 14:04 ivosdc