Skip to content

Commit 631c5ec

Browse files
committed
chore: fix build config
1 parent 8ecadae commit 631c5ec

File tree

6 files changed

+11
-26
lines changed

6 files changed

+11
-26
lines changed
File renamed without changes.
File renamed without changes.

package.json

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,17 @@
11
{
22
"name": "task-testing",
33
"version": "0.0.1",
4-
"type": "module",
54
"files": [
65
"dist"
76
],
87
"main": "dist/index.js",
9-
"exports": {
10-
".": {
11-
"import": "./dist/index.js"
12-
}
13-
},
148
"scripts": {
159
"all": "run-s lint test build",
16-
"start": "webpack serve --config webpack.demo.cjs",
10+
"start": "webpack serve --config webpack.demo.js",
1711
"dev": "npm test -- --auto-watch --no-single-run",
1812
"build": "webpack",
19-
"build:demo": "webpack --config webpack.demo.cjs",
20-
"test": "karma start karma.config.cjs",
13+
"build:demo": "webpack --config webpack.demo.js",
14+
"test": "karma start karma.config.js",
2115
"lint": "eslint ."
2216
},
2317
"license": "MIT",

test/App.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { render, screen } from '@testing-library/react';
22

3-
import TaskTesting from '../lib/index.jsx';
3+
import TaskTesting from '../lib';
44

5-
import { appProps } from './mock/index.js';
5+
import { appProps } from './mock';
66

77
describe('task-testing', function() {
88

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,20 @@
11
const CamundaModelerWebpackPlugin = require('camunda-modeler-webpack-plugin');
22

3-
const path = require('path');
4-
53
module.exports = {
64
mode: 'production',
75
entry: './lib/index.jsx',
6+
devtool: 'source-map',
87
output: {
9-
path: path.resolve(__dirname, 'dist'),
108
filename: 'index.js',
119
library: {
12-
type: 'module',
10+
type: 'umd',
11+
export: 'default',
1312
},
13+
globalObject: 'this',
1414
clean: true
1515
},
16-
experiments: {
17-
outputModule: true
18-
},
1916
resolve: {
20-
extensions: [ '.js', '.jsx', '.scss' ]
21-
},
22-
externals: {
23-
react: 'react',
24-
'react-dom': 'react-dom',
25-
'camunda-bpmn-js': 'camunda-bpmn-js',
17+
extensions: [ '.js', '.jsx' ]
2618
},
2719
plugins: [
2820
new CamundaModelerWebpackPlugin(),
@@ -46,5 +38,4 @@ module.exports = {
4638
},
4739
]
4840
},
49-
devtool: 'eval-source-map'
5041
};

webpack.demo.cjs renamed to webpack.demo.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ module.exports = {
88
path: path.resolve(__dirname, 'demo/dist'),
99
clean: true
1010
},
11-
devtool: 'source-map',
11+
devtool: 'eval',
1212
devServer: {
1313
static: path.join(__dirname, 'demo'),
1414
open: true,

0 commit comments

Comments
 (0)