Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@
"author": "Infragistics",
"main": "dist/src/index.js",
"module": "dist/src/index.js",
"type": "module",
"exports": {
".": "./dist/src/index.js",
"./$(dash-name).js": "./dist/src/$(dash-name).js"
},
"scripts": {
"start": "tsc && wds",
"build": "tsc",
"build": "webpack --mode production",
"lint": "eslint --ext .js,.ts,.html . --ignore-path .gitignore",
"test": "tsc && wtr"
},
Expand All @@ -28,7 +29,8 @@
"igniteui-webcomponents-charts": "~1.3.3",
"igniteui-dockmanager": "~1.6.0",
"@igniteui/material-icons-extended": "^2.10.0",
"lit": "^2.0.2"
"lit": "^2.0.2",
"babel-runtime": "^6.26.0"
},
"devDependencies": {
"@open-wc/eslint-config": "^4.3.0",
Expand All @@ -39,7 +41,21 @@
"igniteui-cli": "$(cliVersion)",
"eslint": "^7.32.0",
"tslib": "^2.3.1",
"typescript": "^4.4.2"
"typescript": "^4.4.2",
"@babel/cli": "^7.16.0",
"@babel/core": "^7.16.0",
"@babel/plugin-proposal-class-properties": "^7.16.0",
"@babel/plugin-transform-runtime": "^7.16.4",
"@babel/preset-env": "^7.16.4",
"@babel/preset-typescript": "^7.16.0",
"@types/source-map": "^0.5.7",
"babel-loader": "^8.2.3",
"babel-plugin-transform-custom-element-classes": "^0.1.0",
"fork-ts-checker-webpack-plugin": "^6.4.2",
"html-webpack-plugin": "^5.5.0",
"source-map": "^0.7.3",
"webpack": "^5.64.2",
"webpack-cli": "^4.9.1"
},
"eslintConfig": {
"parser": "@typescript-eslint/parser",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
import ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin';
import HtmlWebpackPlugin from 'html-webpack-plugin';
import path from 'path';

const __dirname = path.resolve();

export default ({

entry: path.resolve(__dirname, 'src'),
devtool: false,
output: {
filename: '[chunkhash].bundle.js',
},

resolve: {
mainFields: ['fesm2015', 'module', 'main'],
extensions: ['.ts', '.js', '.json'],
},
module: {
rules: [{
test: /\.m?js/,
type: "javascript/auto",
},
{
test: /\.m?js/,
resolve: {
fullySpecified: false,
},
},
{
test: /\.(ts|js)$/,
loader: 'babel-loader',
options: {
"compact": true,
"presets": [
["@babel/preset-env", {
"useBuiltIns": "usage",
"corejs": 3,
"targets": {
"browsers": [
"last 2 Chrome versions",
"last 2 Safari versions",
"last 2 iOS versions",
"last 2 Firefox versions",
"last 2 Edge versions"
]
}
}],
"@babel/preset-typescript"
],
"plugins": [
"@babel/plugin-proposal-class-properties",
"@babel/plugin-transform-runtime"
]
},
exclude:
function(modulePath) {
return /node_modules/.test(modulePath) &&
!/igniteui-webcomponents/.test(modulePath) &&
!/lit-html/.test(modulePath);
}
Comment thread
gmurray81 marked this conversation as resolved.
Outdated
}],
},

plugins: [
new HtmlWebpackPlugin({
title: '@@AppName',
template: './index.html',
}),
new ForkTsCheckerWebpackPlugin(),
],
});