The pattern I have seen so far is to keep the es6 files in a src
directory and build your stuff in npm’s prepublish to the lib
directory.
You will need an .npmignore file, similar to .gitignore but ignoring src
instead of lib
.
More Related Contents:
- Node.js – SyntaxError: Unexpected token import
- Using Node.js require vs. ES6 import/export
- Call async/await functions in parallel
- Why doesn’t instanceof work on instances of Error subclasses under babel-node?
- Difference between import X and import * as X in node.js (ES6 / Babel)?
- “unexpected token import” in Nodejs5 and babel?
- How to run Node.js app with ES6 features enabled?
- require(‘babel/register’) doesn’t work
- Unable to access React instance (this) inside event handler [duplicate]
- Why does babel rewrite imported function call to (0, fn)(…)?
- Node.js plans to support import/export ES6 (ECMAScript 2015) modules
- npm – EPERM: operation not permitted on Windows
- What is “export default” in JavaScript?
- Javascript ES6 TypeError: Class constructor Client cannot be invoked without ‘new’
- Why do I need to await an async function when it is not supposedly returning a Promise?
- Running NPM scripts sequentially
- SyntaxError: ‘import’ and ‘export’ may appear only with ‘sourceType: module’ – Gulp
- After installation of Gulp: “no command ‘gulp’ found”
- Uncaught ReferenceError: process is not defined
- Unable to use Arrow functions inside React component class [duplicate]
- Node.js Port 3000 already in use but it actually isn’t?
- ES6 `export * from import`?
- Writing npm modules in TypeScript
- How to list npm user-installed packages
- Can’t install any NPM package, error 4058
- Re-export default in ES 6 modules
- gulp babel, exports is not defined
- Using Async waterfall in node.js
- Exporting functions with reactjs and babel
- Error installing node-gyp on ubuntu