I have some stencil components developed, but after production build the dist js included in plain HTML and using the component as
<my-comp></my-comp>
is not working there, getting error as calling delete on 'included' is not allowed in strict mode.
below is my stencil config
import { Config } from '@stencil/core'
import { sass } from '@stencil/sass'
export const config: Config = {
namespace: 'mep-components',
srcDir: 'src',
buildEs5: true,
extras: {
cssVarsShim: true,
dynamicImportShim: true,
shadowDomShim: true,
safari10: true,
scriptDataOpts: true,
appendChildSlotFix: false,
cloneNodeFix: false,
slotChildNodesFix: true,
},
outputTargets: [
{
type: 'dist'
},
{
type: 'www'
}
],
devServer: {
reloadStrategy: 'pageReload',
port: 4444
},
plugins: [sass()]
}
below is the package JSON package.json
{
"name": "web-components",
"module": "./dist/index.js",
"collection": "./dist/collection/collection-manifest.json",
"types": "./dist/types/components.d.ts",
"version": "1.0.0",
"description": "",
"main": "./dist/index.cjs.js",
"scripts": {
"start": "stencil build --dev --watch --serve",
"build": "stencil build --prod && node ./src/tasks/after.build.js",
"server": "json-server --watch db.json",
"task": "node ./src/tasks/someTask.js"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"@stencil/core": "^2.6.0",
"moment-timezone": "^0.5.33",
"stencil-click-outside": "^1.7.1",
"uuid": "^8.3.2"
},
"devDependencies": {
"@stencil/sass": "^1.4.1",
"@types/jquery": "^3.5.6",
"chalk": "^4.1.2",
"workbox-build": "^4.3.1"
}
}
One of the breaking changes in Stencil 2.0 was that support for Internet Explorer 11 is disabled by default, it's now opt-in. You need to manually enable it.