diff --git a/.gitignore b/.gitignore index a687ffb..a46a8ba 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,5 @@ npm-debug.log* *.tgz /.vscode + +/sample_treeshake/build \ No newline at end of file diff --git a/package.json b/package.json index 9883b47..f4bb7fd 100644 --- a/package.json +++ b/package.json @@ -79,7 +79,8 @@ "prepare": "npm run build:dev", "prepublishOnly": "npm run build:prod", "release": "release-it --disable-metrics --npm.skipChecks", - "release:pre": "release-it --disable-metrics --npm.skipChecks --preRelease=alpha --npm.tag=next" + "release:pre": "release-it --disable-metrics --npm.skipChecks --preRelease=alpha --npm.tag=next", + "sample": "cd sample_treeshake && rollup -c" }, "dependenciesMeta": { "chart.js": { diff --git a/sample_treeshake/babel.config.js b/sample_treeshake/babel.config.js new file mode 100644 index 0000000..bc7bd37 --- /dev/null +++ b/sample_treeshake/babel.config.js @@ -0,0 +1,16 @@ +module.exports = { + presets: [ + [ + '@babel/preset-env', + { + modules: false, + }, + ], + ], + env: { + test: { + presets: [['@babel/preset-env']], + }, + }, + plugins: ['@babel/plugin-transform-runtime'], +}; diff --git a/sample_treeshake/index.html b/sample_treeshake/index.html new file mode 100644 index 0000000..7cfd4e2 --- /dev/null +++ b/sample_treeshake/index.html @@ -0,0 +1,12 @@ + + +
+