mirror of
https://github.com/atisawd/boxicons.git
synced 2025-08-31 03:19:53 +02:00
Base setup to support box-icon custom element
- added new dependencies to support building custom element - added webpack configuration - added source file for box-icon element - create two new css files with content from css/boxicon.css for animation and transformations
This commit is contained in:
@@ -1,7 +1,50 @@
|
||||
const webpack = require('webpack');
|
||||
const packageJson = require('./package.json');
|
||||
|
||||
module.exports = {
|
||||
entry: `${__dirname}/src/index.js`,
|
||||
|
||||
|
||||
};
|
||||
output: {
|
||||
library: 'BoxIconElement',
|
||||
libraryTarget: 'umd',
|
||||
filename: 'box-icon-element.js',
|
||||
},
|
||||
devtool: 'source-map',
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.js$/,
|
||||
loader: 'babel-loader',
|
||||
options: {
|
||||
babelrc: false,
|
||||
presets: [
|
||||
['env', { modules: false, targets: { uglify: true } }],
|
||||
],
|
||||
plugins: [
|
||||
['babel-plugin-transform-builtin-classes', {
|
||||
globals: ['Array', 'Error', 'HTMLElement'],
|
||||
}],
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
test: /\.css$/,
|
||||
use: [
|
||||
{ loader: 'to-string-loader' },
|
||||
{
|
||||
loader: 'css-loader',
|
||||
options: {
|
||||
camelCase: true,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
plugins: [
|
||||
new webpack.DefinePlugin({
|
||||
'BUILD.DATA': {
|
||||
VERSION: JSON.stringify(packageJson.version),
|
||||
},
|
||||
}),
|
||||
],
|
||||
};
|
||||
|
Reference in New Issue
Block a user