Skip to content
Snippets Groups Projects
Commit 1c3989ff authored by piotr.kupczyk@id.ethz.ch's avatar piotr.kupczyk@id.ethz.ch
Browse files

SSDM-10944 : NG UI table for ELN prototype - compile Grid component into a single js file to import

parent 5a841970
No related branches found
No related tags found
No related merge requests found
...@@ -71,6 +71,7 @@ ...@@ -71,6 +71,7 @@
"scripts": { "scripts": {
"dev": "webpack-dev-server --hot --config webpack.config.dev.js", "dev": "webpack-dev-server --hot --config webpack.config.dev.js",
"build": "webpack-cli --config webpack.config.js", "build": "webpack-cli --config webpack.config.js",
"grid": "webpack-cli --config webpack.config.grid.js",
"unit": "jest", "unit": "jest",
"lint": "eslint --ext .js,.jsx src/js srcTest/js", "lint": "eslint --ext .js,.jsx src/js srcTest/js",
"lint:fix": "eslint --ext .js,.jsx src/js srcTest/js --fix", "lint:fix": "eslint --ext .js,.jsx src/js srcTest/js --fix",
......
import React from 'react'
class TestGrid extends React.PureComponent {
render() {
return <div>TestGrid</div>
}
}
export default TestGrid
import TestGrid from '@src/js/components/common/grid/TestGrid.jsx'
export default TestGrid
/* eslint-disable */
const path = require('path')
module.exports = {
entry: './src/js/components/common/grid/index.js',
output: {
path: __dirname + '/build/js',
filename: 'grid.js'
},
mode: 'production',
module: {
rules: [
{
test: /\.(js|jsx)$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader'
}
},
{
test: /\.(css)$/,
use: ['style-loader', 'css-loader']
},
{
test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
loader: 'url-loader',
options: {
limit: 10000
}
}
]
},
resolve: {
alias: {
'@src': path.resolve(__dirname, 'src/'),
'@srcTest': path.resolve(__dirname, 'srcTest/'),
'@srcV3': path.resolve(__dirname, 'srcV3/')
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment