Skip to content

Commit 30dedbd

Browse files
committed
fix: put style.css file in the correct place
1 parent dba12b0 commit 30dedbd

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,5 @@ cc-test-reporter
1717
# Build directories (Will be preserved by npm)
1818
dist
1919
build
20+
style.css
21+
style.css.map

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"scripts": {
66
"build": "npm run clean && cross-env NODE_ENV=production TARGET=umd webpack --bail",
77
"build:demo": "npm run clean:demo && cross-env NODE_ENV=production TARGET=demo webpack --bail && npm run build-storybook",
8-
"clean": "rimraf dist",
8+
"clean": "rimraf dist style.css style.css.map",
99
"clean:demo": "rimraf build",
1010
"start": "cross-env NODE_ENV=development TARGET=development webpack-dev-server --inline --hot",
1111
"lint": "eslint src examples",
@@ -20,7 +20,9 @@
2020
},
2121
"main": "dist/main.js",
2222
"files": [
23-
"dist"
23+
"dist",
24+
"style.css",
25+
"style.css.map"
2426
],
2527
"repository": {
2628
"type": "git",

webpack.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ const cssLoaders =
4343
: [styleLoader, ...defaultCssLoaders];
4444

4545
const config = {
46-
entry: './src/index',
46+
entry: { 'dist/main': './src/index' },
4747
output: {
48-
path: path.join(__dirname, 'dist'),
48+
path: __dirname,
4949
filename: '[name].js',
5050
libraryTarget: 'umd',
5151
library: 'ReactSortableTree',

0 commit comments

Comments
 (0)